JavaScript Reserved Words
JavaScript reserves some keywords for its own use. You cannot define your own methods or properties with the same name as any of these keywords; if you do, the JavaScript interpreter complains.
Tip
Some of these keywords are reserved for future use. JavaScript might enable you to use them, but your scripts might break in the future if you do.
The following list shows some of JavaScript's reserved keywords. You should not use these in your JavaScripts:
abstract | double | instanceof | super |
boolean | else | int | switch |
break | extends | interface | synchronized |
byte | FALSE | long | this |
case | final | native | throw |
catch | finally | new | throws |
char | float | null | transient |
class | for | package | TRUE |
const | function | private | try |
continue | goto | protected | var |
Get Platinum Edition Using XHTML™, XML, and Java™ 2 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.