关于Ubuntu问题的WebStorm

Sve*_*hev 0 javascript ubuntu use-strict webstorm

几天前我在我的计算机上安装了Ubuntu,然后安装了WebStorm,但我遇到了JavaScript项目的问题.它给了我一个错误,说我不能使用"let"这个词.几个小时后,我找到了一些解决方案:使用"use strict".有可能不是"use strict"吗?

还有一件事:它不认识我Math.pow的更快替代方案:(a**2);

编辑:我正在使用ECMAScript 6,这是确切的错误:SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode

Moh*_*hit 5

您可能需要在WebStorm IDE中启用ECMAScript 6功能.为此,请访问Webstorm的- > - >,然后设置为ECMAScript 6PreferencesLanguage & FeaturesJavascriptJavascript Language Version