ECMAScript-262 描述了一组具有特定用途的关键字,一般用于控制语句的开始或结束,或者用于执行特定的操作等。
全部关键字 | |||
---|---|---|---|
break | else | new | var |
case | finally | return | void |
catch | for | switch | while |
continue | function | this | with |
default | if | throw | |
delete | in | try | |
do | instanceof | typeof |
ECMAScript-262 还描述了另一组保留字,其功能未定义,但它们有可能在未来成为关键字。
全部保留字 | |||
---|---|---|---|
abstract | enum | int | short |
boolean | export | interface | static |
byte | extends | long | super |
char | final | native | synchronized |
class | float | package | throws |
const | goto | private | transient |
debugger | implements | protected | volatile |
double | import | public |