What JavaScript keywords (function names, variables, etc) are reserved?
What JavaScript keywords (function names, variables, etc) are reserved?
We should be linking to the actual sources of info, rather than just the top google hit.
http://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Reserved_Words
JScript 8.0: http://msdn.microsoft.com/en-us/library/ttyab5c8.aspx
To supplement benc's answer, see Standard ECMA-262. These are the official reserved words, but only a pedant ignores the implementation to respect the standard. For the reserved words of the most popular implementations, that is firefox and internet explorer, see benc's answer.
The reserved words in EMCAScript-262 are the Keywords, Future Reserved Words, NullLiteral, and BooleanLiterals, where the Keywords are
break do instanceof typeof
case else new var
catch finally return void
continue for switch while
debugger function this with
default if throw
delete in try
the Future Reserved Words are
abstract export interface static
boolean extends long super
byte final native synchronized
char float package throws
class goto private transient
const implements protected volatile
double import public
enum int short
the NullLiteral is
null
and the BooleanLiterals are
true
false
Here is a list from Eloquent JavaScript book:
breakcasecatchclassconstcontinuedebuggerdefaultdeletedoelseenumexportextendfalsefinallyforfunctionifimplementsimportininstanceofinterfaceletnewnullpackageprivateprotectedpublicreturnstaticsuperswitchthisthrowtruetrytypeofvarvoidwhilewithyield