Javascript基础教程之关键字和保留字汇总

关键字不可以作为变量名或者函数名


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

保留字是为以后关键字而准备的

也不可以用来变量或者函数名。


abstract
boolean
byte
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

在定义变量时,不要使用关键字或者保留字,否则会出现一些莫名其妙的情况。

若文章对您有帮助,帮忙点个赞!

0
-3
发布时间 2015-01-18 11:54:55
0 条回复(回复会通过微信通知作者)
点击加载更多评论
登录 后再进行评论
(微信扫码即可登录,无需注册)