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

Destructuring breaks if no space between 'var' and pattern

Open webbedspace opened this issue 10 years ago • 0 comments

The code function e(){ var[a,b]=[1,2];return a} wrongly compiles to

function e(){ vara = (b = [1,2])[0], b = b[1];return a}

which, as you can see, mangles the var keyword.

webbedspace avatar Jan 27 '15 01:01 webbedspace