Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Eclipse mark valid JavaScript with an error?

The JavaScript:

[a,b] = [b,a];

The Eclipse error:

The left-hand side of an assignment must be a variable

Is there some plugin or something I need in order to get Eclipse to correctly inspect JavaScript?

like image 870
BishopZ Avatar asked Aug 29 '26 03:08

BishopZ


1 Answers

It's only valid in Mozilla's JavaScript implementation, found in Firefox for example.

Technically this is actual "JavaScript" according to a more technical definition of the word, but it's currently not valid "ECMAScript", which is usually what people are talking about when they use the word "JavaScript".

like image 98
user1106925 Avatar answered Aug 31 '26 16:08

user1106925



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!