Destructuring assignments are not supported by current JavaScript version

Devil's Advocate picture Devil's Advocate · Jun 7, 2016 · Viewed 8.6k times · Source

I followed the steps here to configure code completion and other stuff in WebStorm but I'm still getting the following syntax errors.

enter image description here

How can I resolve this?

Answer

lena picture lena · Jun 7, 2016

By changing 'JavaScript language version' (Settings/Languages & Frameworks/JavaScript) accordingly, to either 'ECMASCript 6' or 'JSX Harmony'. BTW, WebStorm can do it for you: hit Alt+Enter on the highlighted statement, choose 'Change JavaScript version to ECMASCript 6' from the popup