|
JavaScript
Recerved Keywords
Reserved
Words
Reserved Words are words that have special
meaning to JavaScript. Therefore, they can't be used as variable
or function names.
You'll recognize many of the reserved words
from previous examples, but others will be unfamiliar. Some of
the latter group are future reserved words; i.e.it is expected
that they'll be commands in future versions of JavaScript.
They're being set aside now so that you won't have to revise
your code when new revisions are released.
| abstract |
else |
instanceOf |
static |
| boolean |
extends |
int |
super |
| break |
false |
interface |
switch |
| byte |
final |
long |
synchronized |
| case |
finally |
native |
this |
| catch |
float |
new |
throw |
| char |
for |
null |
transient |
| class |
function |
package |
true |
| const |
goto |
private |
try |
| continue |
if |
protected |
var |
| default |
implements |
public |
void |
| do |
import |
return |
while |
| double |
in |
short |
with |
Other Identifiers To Avoid
These words aren't officially
reserved, but as they are part of the JavaScript language, you
shouldn't use them as function or variable names. If you do,
abandon all hope; the results will be unpredictable.
| alert |
History |
Packages |
| Anchor |
Image |
parent |
| Area |
isNaN |
parseFloat |
| Array |
java |
parseInt |
| assign |
JavaArray |
Password |
| blur |
JavaClass |
Plugin |
| Boolean |
JavaObject |
prompt |
| Button |
JavaPackage |
prototype |
| Checkbox |
length |
Radio |
| clearTimeout |
Link |
ref |
| close |
location |
Reset |
| closed |
Location |
scroll |
| confirm |
Math |
Select |
| Date |
MimeType |
self |
| defaultStatus |
name |
setTimeout |
| document |
navigate |
status |
| Document |
navigator |
String |
| Element |
Navigator |
Submit |
| escape |
netscape |
sun |
| eval |
Number |
taint |
| FileUpload |
Object |
Text |
| focus |
onBlur |
Textarea |
| Form |
onError |
top |
| Frame |
onFocus |
toString |
| frames |
onLoad |
unescape |
| Function |
onUnload |
untaint |
| getClass |
open |
valueOf |
| Hidden |
opener |
window |
| history |
option |
Window |
|