Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  3] [ 3]  / answers: 1 / hits: 18535  / 8 Years ago, thu, march 3, 2016, 12:00:00

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 to isolate variables.



This works fine in my browser however PhpStorm sees it as an error and when I hover above it gives me:




Let definition are not supported by current JavaScript version




So my question is how do I upgrade the current JavaScript version?


More From » phpstorm

 Answers
9

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):



enter


[#63067] Tuesday, March 1, 2016, 8 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jeanettee

Total Points: 209
Total Questions: 97
Total Answers: 98

Location: Papua New Guinea
Member since Thu, Jul 9, 2020
4 Years ago
;