JavaScript |保留字
在 JavaScript 中,您不能将这些保留字用作变量名、标签名或函数名。
保留字:
abstract | arguments | boolean | break | byte |
case | catch | char | const | continue |
debugger | default | delete | do | double |
else | eval | false | final | finally |
float | for | function | goto | if |
implements | in | instanceof | int | interface |
long | native | new | null | package |
private | protected | public | return | short |
static | switch | synchronized | this | throw |
throws | transient | true | try | typeof |
var | void | volatile | while | with |
yield |
ECMAScript 5 和 6 中添加的保留字。
awaits | class | enum | export |
extends | import | let | super |
删除保留字
以下保留字已从 ECMAScript 5 和 6 中删除。
abstract | boolean | byte | char |
double | final | float | goto |
int | long | native | short |
synchronized | throws | transient | volatile |