Home >Web Front-end >Front-end Q&A >What should I do if the es6 syntax in idea is not supported?
Solution steps: 1. Click "File" - "settings" - "Languages & Frameworks" - "JavaScript" in the menu bar, and change the version to "ECMAScript 6"; 2. In the menu bar Click "File" - "Default Settings" - "Languages & Frameworks" - "JavaScript" and change the version to ES6.
The operating environment of this tutorial: windows7 system, ECMAScript 6&&IntelliJ IDEA 2022 version, Dell G3 computer.
A vuejs project displays a js syntax error in idea
# After investigating the cause of the error, it turns out that it is because IDEA defaults to js syntax verification during js syntax verification. ES5 (ECMAScript 5), which needs to be modified to ES6 in the IDEA settings.
The solution to the unsupported es6 syntax in idea
There are two places to set the javascript version, both of which are changed to es6
First place:
1. In the idea menu bar, click "File"-"settings"
2. In the settings interface, click "Languages & Frameworks" - "JavaScript"
Change the value of the "JavaScript language version" option on the right to "ECMAScript 6" ---Change the JavaScript version to ES6
Second place
In the idea menu bar, click "File"-"Default Settings"->"Languages & Frameworks" ->"JavaScript", just change the version to ES6.
The above is the detailed content of What should I do if the es6 syntax in idea is not supported?. For more information, please follow other related articles on the PHP Chinese website!