?
This document uses PHP Chinese website manual Release
JScript? | 語(yǔ)言參考 |
Jscript 有一些保留字不能在標(biāo)識(shí)符中使用。保留字對(duì) Jscript 語(yǔ)言有特殊的含義,它們是語(yǔ)言語(yǔ)法的一部分。使用保留字在加載腳本的時(shí)候?qū)a(chǎn)生編譯錯(cuò)誤。
Jscript 還有一些留作將來(lái)使用的保留字。這些字不是現(xiàn)在的 Jscript 語(yǔ)言的一部分,然而它們是為將來(lái)的使用保留的。
保留詞
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 |
當(dāng)選擇標(biāo)識(shí)符時(shí)避免使用已經(jīng)在內(nèi)部 Jscript 對(duì)象或函數(shù)中使用的詞,如 String 或 parseInt。