JavaScript Reserved Words

本文列举了JavaScript中的一系列保留字和关键字,并提醒开发者避免将这些词汇用作变量或函数名称,以防引发语法冲突。文章涵盖了核心保留字、ECMAScript保留字以及其他JavaScript相关的关键字。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

[url]http://www.quackit.com/javascript/javascript_reserved_words.cfm[/url]



You should avoid using these reserved words and keywords as function or variable names as JavaScript has reserved these words for its own use.

JavaScript Reserved Words
break continue do for import new this void
case default else function in return typeof while
comment delete export if label switch var with

Java Keywords (Reserved by JavaScript)
abstract implements protected
boolean instanceOf public
byte int short
char interface static
double long synchronized
false native throws
final null transient
float package true
goto private

ECMAScipt Reserved Words
catch enum throw
class extends try
const finally
debugger super

Other JavaScript Keywords
alert eval Link outerHeight scrollTo
Anchor FileUpload location outerWidth Select
Area find Location Packages self
arguments focus locationbar pageXoffset setInterval
Array Form Math pageYoffset setTimeout
assign Frame menubar parent status
blur frames MimeType parseFloat statusbar
Boolean Function moveBy parseInt stop
Button getClass moveTo Password String
callee Hidden name personalbar Submit
caller history NaN Plugin sun
captureEvents History navigate print taint
Checkbox home navigator prompt Text
clearInterval Image Navigator prototype Textarea
clearTimeout Infinity netscape Radio toolbar
close innerHeight Number ref top
closed innerWidth Object RegExp toString
confirm isFinite onBlur releaseEvents unescape
constructor isNan onError Reset untaint
Date java onFocus resizeBy unwatch
defaultStatus JavaArray onLoad resizeTo valueOf
document JavaClass onUnload routeEvent watch
Document JavaObject open scroll window
Element JavaPackage opener scrollbars Window
escape length Option scrollBy
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值