Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java keywords in javascript

according to this page http://www.quackit.com/javascript/javascript_reserved_words.cfm javascript has some keywords which are from java, reserved. I also notice that with the highlighting in my editor. Is this to be future proof? Are they planning to implement some more OOP style operators into javascript?

I would love to se interfaces, abstract classes and things like that coming to js, but does the reservation of these words indicate anything?

like image 803
bigblind Avatar asked May 09 '11 16:05

bigblind


People also ask

What are keywords in JavaScript?

Keywords are reserved words that are part of the syntax in the programming language. For example, const a = 'hello'; Here, const is a keyword that denotes that a is a constant.


1 Answers

From the ECMA-262 spec, §7.6.1.2 (Future Reserved Words):

ecmascipt section screenshot

And, from §2 (Conformance):

A conforming implementation of ECMAScript is permitted to support program and regular expression syntax not described in this specification. In particular, a conforming implementation of ECMAScript is permitted to support program syntax that makes use of the "future reserved words" listed in 7.6.1.2 of this specification.

like image 187
Matt Ball Avatar answered Oct 04 '22 01:10

Matt Ball