Content deleted Content added
Cactus.man (talk | contribs) m Reverted edits by 61.246.47.241 (talk) to last version by Fred Bradstadt |
|||
Line 555:
}
==Miscellaneous==
===Case sensitivity===
JavaScript is case sensitive.
===Whitespace===
[[Space (punctuation)|Space]]s, [[tab]]s and [[newline]]s used outside of string constants are called [[whitespace]]. Unlike C, whitespace in JavaScript source can directly impact semantics. Because of a technique called "semicolon insertion", any statement that is well formed when a newline is parsed will be considered complete (as if a semicolon were inserted just prior to the newline). Programmers are advised to supply statement terminating semicolons explicitly to enhance readability and lessen unintended effects of the automatic semicolon insertion.
''Unnecessary whitespace'', whitespace characters that are not needed for correct syntax, can increase the amount of wasted space, and therefore the file size of .js files. Where file compression techniques that remove unnecessary whitespace are used, performance can be improved if the programmers have included these so-called 'optional' semicolons.
===Comments===
[[Comment]] syntax is the same as in [[C++]].
// comment
/* multi-line
comment */
==See also==
|