日期:2014-05-16  浏览次数:20318 次

javascript中的保留关键

标识符由一个字母或下划线开头,一般用于表示变量名、函数名、类名、属性名等。但是它不能使用系统的那些保留关键字 ,具体如下列表(按字母顺序排列)


abstract


boolean break byte


case catch char class const continue


debugger default delete do double


else enum export extends


false final finally float for function


goto


if implements import in instaceof int interface


long


native new null


package private protected public


return


short static super switch synchronized


this trhow throws transient true try typeof


var volatile void


while with


补充:undefined NaN Infinity

?

在对变量、函数、属性进行命名时,要避开这些词汇。