`
opensuse
  • 浏览: 183896 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

JS保留字

阅读更多

转自:WINDOWS脚本技术(微软官方手册)

 

Jscript 有一些保留字不能在标识符中使用。保留字对 Jscript 语言有特殊的含义,它们是语言语法的一部分。使用保留字在加载脚本的时候将产生编译错误。

Jscript 还有一些留作将来使用的保留字。这些字不是现在的 Jscript 语言的一部分,然而它们是为将来的使用保留的。

保留字

break delete function return typeof
case do if switch var
catch else in this void
continue false instanceof throw while
debugger finally new true with
default for null try  

将来的保留字

abstract double goto native static
boolean enum implements package super
byte export import private synchronized
char extends int protected throws
class final interface public transient
const float long short volatile

当选择标识符时避免使用已经在内部 Jscript 对象或函数中使用的词,如 StringparseInt

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics