Javascript Reserved Words (Javascript保留字)
-----------javascript的保留字不能作为变量名和函数名使用。使用Javascript保留字作为变量名或者函数名,会使Javascript在载入过程出现编译错误。
Javascript保留字列表:
| break | delete | function | return | typeof |
| case | do | if | switch | var |
| catch | else | in | this | void |
| continue | false | instanceof | throw | while |
| debugger | finally | new | true | with |
| default | for | null | try | |
Javascript未来保留字
| abstract | double | goto | native | static |
| boolean | enum | implements | package | super |
| byte | export | import | private | synchronized |
| char | extends | int | protected | throws |
| class | final | interface | public | transient |
| const | float | long | short | volatile |
本文详细介绍了Javascript的保留字列表,解释了为何不能将其用作变量名和函数名,并探讨了其在编程实践中的重要性和潜在陷阱。
543

被折叠的 条评论
为什么被折叠?



