Closed JoeHetfield closed 7 years ago
Ch2, line 277:
Do you spot the [ .. ] brackets around the argument list now? That's array destructuring.
[ .. ]
And the code snippet in question:
function foo( [x,y,...args] = [] ) { // .. } foo( [1,2,3] );
I think the destructuring would happen at [x,y,...args] part, so the "argument list" in the text should be "parameter list".
[x,y,...args]
Yep, good catch. PR?
PR submitted.
fixed in #96
Ch2, line 277:
And the code snippet in question:
I think the destructuring would happen at
[x,y,...args]
part, so the "argument list" in the text should be "parameter list".