Line terminators are used to improve the readability of the source text and to separate tokens. However, unlike whitespace, line terminators can affect the behavior of the script when placed in certain places.
In general, a line terminator can occur between any two tokens but cannot appear in a token or inside a string literal. Line terminators in string literals must be escaped if they are required as part of the string. Line terminators also affect the automatic semicolon insertion process.
Line terminators occurring during a single line comment delimited by a pair of slash characters (//) are considered to be the end of the comment, and any remaining comment text be interpreted as if it were executable code.
Line terminators occurring during a multiple line comment block (/* ... */) will be discarded and the entire comment block will be replaced with a single line terminator.
|Escape Sequence||Unicode Value||Name||Symbol|
The terms Line Terminator and Newline can for most purposes be used interchangeably. Newline is preferred when referring to a \n escape sequence since it more clearly suggests the meaning of the escape.
ECMA edition 3 adds the Unicode line separator and paragraph separator code points to the list of valid line terminators.
ECMA 262 edition 2 - section - 7.2
ECMA 262 edition 2 - section - 7.8
ECMA 262 edition 3 - section - 7.3