春望(杜甫)

国破山河在,城春草木深。

感时花溅泪,恨别鸟惊心。

烽火连三月,家书抵万金。

白头搔更短,浑欲不胜簪。

">
立诚勿怠,格物致知
It's all about connecting the dots

JavaScript Reserved Words

摘自:《JavaScript Visual QuickStart Guide (8th Edition)》。

Reversed words are words that have special meaning to JavaScript. Therefore, they cannot be used as variable or function names.

ECMAScript Edition 3 Reserved Words

These words are part of the JavaScript language as of ES3.

  • 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

ES3 Future Reserved Words

  • 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

ECMAScript Edition 5 Reserved Words

This is ES5’s list of reserved words. It’s similar to that of ES3, but given that browsers primarily suppot ES3, we recommend that you keep both lists in mind.

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

ES5 Future Reserved Words

  • class
  • const
  • enum
  • export
  • extends
  • implements
  • import
  • interface
  • let
  • package
  • private
  • protected
  • public
  • static
  • super
  • yield

Oter identifiers to avoid

These (along with the object names) aren’t officially reserved, but as they are (or may be) part of the JavaScript language, you shouldn’t use them as function or variable names. If you do, abandon all hope; the results will be unpredictable.In addition, most browsers are case-sensitive, which means that they differentiate between Document and document. Internet Explorer is only sometimes case-sensitive, which means that, for example, it may not understand any difference etween Document and document. Consequently, be aware that just because it works in one browser doesn’t mean tha it’ll always work in others. Test, test, test.

  • abstract
  • arguments
  • Array
  • Boolean
  • byte
  • call
  • cast
  • char
  • Date
  • decimal
  • decodeURI
  • decodeURIComponent
  • double
  • dynamic
  • each
  • encodeURI
  • encodeURICompnent
  • Error
  • eval
  • EvalError
  • false
  • final
  • float
  • Function
  • generator
  • get
  • goto
  • has
  • include
  • Infinity
  • int
  • internal
  • intrinsic
  • is
  • isFinite
  • isNaN
  • JSON
  • like
  • long
  • Math
  • namespace
  • NaN
  • native
  • null
  • Number
  • Object
  • override
  • parseFloat
  • parseInt
  • precision
  • prototype
  • RangeError
  • ReferenceError
  • RegExp
  • rounding
  • set
  • short
  • standard
  • strict
  • String
  • synchronized
  • SyntaxError
  • throws
  • to
  • transient
  • true
  • type
  • TypeError
  • uint
  • undefined
  • URIError
  • use
  • volatile
  • xml
赞(0) 打赏
文章名称:《JavaScript Reserved Words》
文章链接:https://www.orzzone.com/javascript-reserved-words.html
商业联系:yakima.public@gmail.com

本站大部分文章为原创或编译而来,对于本站版权文章,未经许可不得用于商业目的,非商业性转载请以链接形式标注原文出处。
本站内容仅供个人学习交流,不做为任何投资、建议的参考依据,因此产生的问题需自行承担。

评论 抢沙发

大前端WordPress主题 更专业 更方便

支持快讯、专题、百度收录推送、人机验证、多级分类筛选器,适用于垂直站点、科技博客、个人站,扁平化设计、简洁白色、超多功能配置、会员中心、直达链接、文章图片弹窗、自动缩略图等...

去看看

觉得文章有用就打赏一下文章作者

非常感谢你的打赏,我们将继续给力提供更多优质内容!

支付宝扫一扫打赏

微信扫一扫打赏

登录

找回密码

注册