PhpStorm “Let definition are not supported by current JavaScript version”

后端 未结 2 1782
长发绾君心
长发绾君心 2020-12-17 07:32

I am trying to be a good little programmer and use the new tools available for coding JavaScript. Therefore I\'m trying to use let instead of var t

相关标签:
2条回答
  • 2020-12-17 08:05

    Go to

    Settings / Languages & Frameworks / JavaScript

    (it may be Preferences / Languages & Frameworks / JavaScript on some OSes)

    ...and set the "JavaScript language version" to "ECMAScript 6" (or, if they've updated to reflect current naming, "ECMAScript 2015" — or "ECMAScript 2016" or later if you're coding to a newer spec):

    0 讨论(0)
  • 2020-12-17 08:15

    The setting is found in File -> Settings -> Language & Frameworks -> Javascript and the option should be on the left, a dropdown box next to "JavaScript Language Version"

    0 讨论(0)
提交回复
热议问题