| title | ms.custom | ms.date | ms.prod | ms.reviewer | ms.suite | ms.technology | ms.tgt_pltfrm | ms.topic | dev_langs | helpviewer_keywords | ms.assetid | caps.latest.revision | author | ms.author | manager | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
JavaScript Reserved Words | Microsoft Docs |
01/18/2017 |
windows-client-threshold |
|
language-reference |
|
|
ab2c246c-99c7-4594-b598-c91909653e09 |
9 |
mikejo5000 |
mikejo |
ghogen |
[!INCLUDEjavascript] has a number of reserved words that you cannot use as identifiers. Reserved words have a specific meaning to the [!INCLUDEjavascript] language, as they are part of the language syntax. Using a reserved word causes a compilation error when loading your script.
[!INCLUDEjavascript] also has a list of future reserved words. These words are not currently part of the [!INCLUDEjavascript] language, although they are reserved for future use. For more information about future reserved keywords in JavaScript, see JavaScript Future Reserved Words.
When choosing identifiers it is also important to avoid any words that are already the names of intrinsic [!INCLUDEjavascript] objects or functions, such as String or parseInt.
| break | default | function | return | var |
| case | delete | if | switch | void |
| catch | do | in | this | while |
| const | else | instanceof | throw | with |
| continue | finally | let | try | |
| debugger | for | new | typeof |