关键字
关键字可用于表示控制语句的开始或结束,或用于执行特定操作等。关键字不能用作标识符。
- 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
保留字
保留字有可能将来被用作关键字,也不能用作标识符,以下是ECMA-262第三版定义的保留字:
- 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
最后
以上就是简单网络最近收集整理的关于JS中的关键字和保留字的全部内容,更多相关JS中内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复