Destructuring object outside of var declaration

Boris Zbarsky bzbarsky at mit.edu
Mon Nov 14 21:53:42 UTC 2016


On 11/13/16 1:28 PM, Thaddee Tyl wrote:
>     var foo, bar;
>     {foo, bar} = {foo: 2, bar: 3};
>
> is a "SyntaxError: expected expression, got '='" in Firefox, and *it
> works in Google Chrome*.

I get "Uncaught SyntaxError: Unexpected token =" in Chrome "56.0.2914.3 
dev" and in Chrome "54.0.2840.9" (release).

-Boris


More information about the es-discuss mailing list