This isn’t a compleate list of reserved words, but it’s a good start. For a complete list
look in the ECMAScript
standards documents. Also useful in fighting insomnia. Reserved words cannot be used to name
variables, functions, methods, or as object identifiers.
Cannot Use
| |
|
|
|
| abstract |
else |
instanceof |
super |
| boolean |
enum |
int |
switch |
| break |
export |
interface |
synchronized |
| byte |
extends |
let |
this |
| case |
false |
long |
throw |
| catch |
final |
native |
throws |
| char |
finally |
new |
transient |
| class |
float |
null |
true |
| const |
for |
package |
try |
| continue |
function |
private |
typeof |
| debugger |
goto |
protected |
var |
| default |
if |
public |
void |
| delete |
implements |
return |
volatile |
| do |
import |
short |
while |
| double |
in |
static |
with |
Ought not use
| |
|
|
| alert |
frames |
outerHeight |
| all |
frameRate |
outerWidth |
| anchor |
function |
packages |
| anchors |
getClass |
pageXOffset |
| area |
hasOwnProperty |
pageYOffset |
| Array |
hidden |
parent |
| assign |
history |
parseFloat |
| blur |
image |
parseInt |
| button |
images |
password |
| checkbox |
Infinity |
pkcs11 |
| clearInterval |
isFinite |
plugin |
| clearTimeout |
isNaN |
prompt |
| clientInformation |
isPrototypeOf |
propertyIsEnum |
| close |
java |
prototype |
| closed |
JavaArray |
radio |
| confirm |
JavaClass |
reset |
| constructor |
JavaObject |
screenX |
| crypto |
JavaPackage |
screenY |
| Date |
innerHeight |
scroll |
| decodeURI |
innerWidth |
secure |
| decodeURICompo |
nent layer |
select |
| defaultStatus |
layers |
self |
| document |
length |
setInterval |
| element |
link |
setTimeout |
| elements |
location |
status |
| embed |
Math |
String |
| embeds |
mimeTypes |
submit |
| encodeURI |
name |
taint |
| encodeURIComponent |
NaN |
text |
| escape |
navigate |
textarea |
| eval |
navigator |
top |
| event |
Number |
toString |
| fileUpload |
Object |
undefined |
| focus |
offscreenBuffering |
unescape |
| form |
open |
untaint |
| forms |
opener |
valueOf |
| frame |
option |
window |