ECMA-262 describes a set of keywords with a specific purpose, which can be used to indicate the beginning or end of a control statement, or to perform a specific operation, etc. Regulations: Keywords are language reserved and cannot be used as identifiers.
All keywords for ECMAScript (* is added in the fifth edition):
break do instanceof typeof case else new var catch finally return void continue for switch while debugger* function this with default if throw delete in try
All reserved words in ECMA-262 (third edition):
abstract enum int short boolean export interface static byte extends long super char final native class
synchronized float package throws const goto private transient debugger implements protected volatile double
import public
The reserved words may be used as a reprinted keyword, such as the new debugger added in the fifth edition is the reserved words in the third edition.
Reserved words in non-strict mode in the fifth edition:
class enum extends support const export import
Reserve words in strict mode:
implements package public interface private static let protected yield
Note: let and yield are newly added reserved words; for compatibility, it is recommended to be used as reference reserved words.
Using keywords and reserved words in Javascript will result in an error. Not recommended!