You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not all JS reserved words generate an error in Randori. Not even will some of these reserved words cause an error in a lot of browsers, but, the Google Closure compiler DOES choke on it. We need to keep Closure happy for obvious reasons, so here is a list of reserved words for JS, the compiler should throw an error when they are used in the wrong places:
abstract
boolean break byte
case catch char class const continue
debugger default delete do double
else enum export extends
false final finally float for function
goto
if implements import in instanceof int interface
long
native new null
package private protected public
return
short static super switch synchronized
this throw throws transient true try typeof
var volatile void
while with
Most of those words are not even used in the language. A reserved word cannot be used
As a name in literal object notation
As a member name in dot notation
As a function argument
As a var
As an unqualified global variable
As a statement label
Not all JS reserved words generate an error in Randori. Not even will some of these reserved words cause an error in a lot of browsers, but, the Google Closure compiler DOES choke on it. We need to keep Closure happy for obvious reasons, so here is a list of reserved words for JS, the compiler should throw an error when they are used in the wrong places:
abstract
boolean break byte
case catch char class const continue
debugger default delete do double
else enum export extends
false final finally float for function
goto
if implements import in instanceof int interface
long
native new null
package private protected public
return
short static super switch synchronized
this throw throws transient true try typeof
var volatile void
while with
Most of those words are not even used in the language. A reserved word cannot be used
As a name in literal object notation
As a member name in dot notation
As a function argument
As a var
As an unqualified global variable
As a statement label
I got this list and descriptions from this page by Douglas Crockford:
http://www.crockford.com/javascript/survey.html
The text was updated successfully, but these errors were encountered: