Whitespace is used to improve the readability of the script and to separate tokens from one another where they could be misinterpreted if they were concatenated together.
Whitespace characters are insignificant to the script execution apart from how they may affect the interpretation of tokens. The placement of white space can affect the way an expression is evaluated. For example:
a = 10000;
Will assign the value 10000 to the variable a, whereas:
a = 10 000;
May assign the value 10 to variable a but will likely generate a syntax error unless the interpreter is especially forgiving. Strictly speaking the interpreter should reject this:
a = c ++;
Is also incorrect since the postfix operator is dissociated from the variable it operates on by the whitespace in between.
Actually, there are remarkably few places that whitespace cannot be introduced.
|Escape Sequence||Unicode Value||Name||Symbol|
|-||Other category "Zs"||Other Unicode space characters||<USP>|
ECMA edition 3 adds a couple of new whitespace character definitions. One is the non-breaking space and the other refers generally to Unicode spacing characters.
ECMA 262 edition 2 - section - 7.1
ECMA 262 edition 3 - section - 7.2