See the stages and lexical semantics sections in the formal description chapter for the details. The lexer recognizes several nonreserved words that have special meanings in some contexts but can be used as identifiers. Numerals may be followed by units. Semicolon insertion on line breaks are both disabled in strict mode . Before the end of the program Semicolons are optional in these situations even if they would construct empty statements.
Strict mode has no effect on semicolon insertion in the above cases.
In addition, sometimes line breaks in the input stream are turned into VirtualSemicolon tokens. This kind of VirtualSemicolon insertion does not occur in strict mode . See also the semicolon insertion syntax rationale . See the regular expression syntax rationale for a discussion of the issues. When a numeric literal is immediately followed by an identifier, the lexer converts the identifier to a string literal.