|
|
|
|
|
by BeefWellington
1496 days ago
|
|
The confusion is a byproduct of using the same syntax in multiple places. It's even easy to fall into the trap of reasoning through the logic of what's happening as spreading, e.g.: "If I put the spread syntax right before the argument in my function, I'm telling the engine to essentially spread [ arguments[n] ... arguments[arguments.length] ] into this single argument value, where 'n' is the position of my spread syntax." It's not truly correct but if you think about it in this manner it actually fits reasonably well into what the result is. |
|