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

js 高级学习笔记( 三 ) ECMAScript 关键字,保留字

?1, ?ECMAScript ?关键字

?

break

case

catch

continue

default

delete

do

else

finally

for

function

if

in

instanceof

new

return

switch

this

throw

try

typeof

var

void

while

with

-------

?

? ? ? ?把关键字作为变量名,或者函数名的话 ?可能会的到 Identifier Expected 这样的错误.

?

2, ?保留字 ??

?

abstract

boolean

type

char

class

const

debugger

double

enum

export

extends

final

float

goto

implements

import

int

interface

long

native

package

private

protected

public

short

static

super

synchronized

throws

transient

volatile ?

--- ??

? ? ?将保留字做变量名, 不会出错, 但是当浏览器实现了该保留字之后,就会报错了, 所以还是不要用了 !!