es6-features icon indicating copy to clipboard operation
es6-features copied to clipboard

Destructuring Assignment/Array Matching sample does not work as expected on the 'reduced' version

Open ericvera opened this issue 7 years ago • 1 comments

In the case of:

var list = [ 1, 2, 3 ]
var [ a, , b ] = list
[ b, a ] = [ a, b ]

list[ b, a ] is interpreted as an array expression. http://astexplorer.net/ was useful to troubleshoot it.

ericvera avatar Apr 11 '17 15:04 ericvera

Hmmmm... correct, yes. But I cannot do anything here as the reduced version is automatically generated from the semicolon-based source.

rse avatar Apr 30 '17 19:04 rse