Before the end of the program Semicolons are optional in these situations even if they would construct empty statements.
Line breaks are no longer significant in source code and are treated like any other white space.
To support error recovery , JavaScript 2.0's lexical grammar must be made independent of its syntactic grammar. If one wants to place a regular expression literal at the very beginning of an expression statement, it's best to put the regular expression in parentheses. Fortunately, this is not common since one usually assigns the result of the regular expression operation to a variable. The full parser changes for each version of JavaScript.