0

I am using eclipse Luna Release (4.4.0), but it throw's an error when i declare varibale in .js file by let but fine with var

let x =10; it throw's an error 

syntax error on token

but var x = 10; is fine.

DHARMENDRA SINGH
  • 607
  • 5
  • 21
  • Have you tried updating eclipse? 'let' in JavaScript is quite new...try https://www.eclipse.org/webtools/jsdt/ – SPlatten Dec 04 '17 at 13:02

1 Answers1

0

are you using the "use strict" ?

Also are you removing the eclipse validations?

Augusto
  • 89
  • 6
  • also, if you would not like to remove the validations. Go to this post and check the javascript validator in luna https://stackoverflow.com/questions/27826876/enable-javascript-validation-in-eclipse-luna – Augusto Dec 04 '17 at 14:44
  • Yes i am using "use strict" and one more thing there are lot more validators which one should i removed? – DHARMENDRA SINGH Dec 05 '17 at 03:54
  • Also Right click your project Select Properties -> JavaScript -> Include Select Source tab (It looks similar to the Java Build Path Source tab) Expand source folder Highlight Excluded pattern Click Edit button Click Add button next to Exclusion patterns box. Click Browse button and select the JavaScript source by name. – Augusto Dec 05 '17 at 15:27
  • Inside JavaScript no (Include Select Source tab) , present tabs are 1. Code Style 2.Editor 3. Validator – DHARMENDRA SINGH Dec 06 '17 at 03:50