您的位置:首页 > Web前端 > JavaScript

JavaScript 保留关键字

2016-03-16 17:17 489 查看
Javascript 的保留关键字不可以用作变量、标签或者函数名。有些保留关键字是作为 Javascript 以后扩展使用。

abstract arguments boolean break byte

case catch char class* const

continue debugger default delete do

double else enum* eval export*

extends* false final finally float

for function goto if implements

import* in instanceof int interface

let long native new null

package private protected public return

short static super* switch synchronized

this throw throws transient true

try typeof var void volatile

while with yield

JavaScript 对象、属性和方法

您也应该避免使用 JavaScript 内置的对象、属性和方法的名称作为 Javascript 的变量或函数名:

Array Date eval function hasOwnProperty

Infinity isFinite isNaN isPrototypeOf length

Math NaN name Number Object

prototype String toString undefined valueOf
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: