Keywords include: break, delete, if, this, while, case, do, in, throw, with, catch, else, instanceof, try, continue, finally, new, typeof, for, return, etc. .
The operating environment of this tutorial: windows7 system, javascript version 1.8.5, Dell G3 computer.
Javascript keywords (Keywords) refer to those words that have specific meanings in the Javascript language and become part of the Javascript syntax. They are a set of names (or commands) used internally in the JavaScript language.
break | delete | if | this | while |
case | do | in | throw | with |
catch | else | instanceof | try | |
continue | finally | new | typeof | |
debugger(ECMAScript 5 new) | for | return | var | |
default | function | switch | void |
Javascript keywords cannot be used as variable names and function names. Using Javascript keywords as variable names or function names will cause compilation errors in Javascript during the loading process.
Keywords in js can be used to indicate the beginning or end of a control statement, or to perform specific operations, etc. As a rule, keywords are also language reserved and cannot be used as identifiers.
[Recommended learning: javascript advanced tutorial]
The above is the detailed content of What are the keywords of javascript. For more information, please follow other related articles on the PHP Chinese website!