实际使用了什么保留字?

时间:2011-04-26 01:04:59

标签: javascript

JavaScript中有许多保留字,但实际使用的语言有多少?

     const  for private  typeof  continue 
     catch  final new  transient function
    abstract   else  instanceof switch
               synchronized
                  boolean
                   enum
                    int
                   break
                    var
                   export
                  interface         debugger goto public
                    this            void
                    byte            default 
                  protected         if
                   extends          return
                    long            volatile
                   throw            delete implements short
 continue           case                              while
  native           false                              import
  class            throws                             do
  char package float  try                             static
  finally null true const           double in  super  with 

对于以前没有使用过的那些,有更新版本(比如1.5+)的JavaScript利用(或计划利用)其中任何一种吗?

1 个答案:

答案 0 :(得分:2)

查看https://developer.mozilla.org/en/JavaScript/Reference/Reserved_Words

另外,我在http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf

上看不到你的一些话

请参阅第211页,没有volatile,例如:

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

-- FutureReservedWord :
class
enum
extends
super
const
export
import

-- Strict Mode :
implements
let
private
public
interface
package
protected
static
yield