JavaScript syntax: Difference between revisions

Content deleted Content added
Fixed/updated links
Bluelink 1 book for verifiability (prndis)) #IABot (v2.0) (GreenC bot
Line 26:
[[Space (punctuation)|Space]]s, [[tab character|tab]]s and [[newline]]s used outside of string constants are called [[whitespace (computer science)|whitespace]]. Unlike in [[C (programming language)|C]], whitespace in JavaScript source can directly impact [[Semantics (computer science)|semantics]]. Because of a technique called "automatic [[semicolon insertion]]" (ASI), some statements that are well formed when a newline is parsed will be considered complete (as if a semicolon were inserted just prior to the newline). Some authorities advise supplying statement-terminating semicolons explicitly, because it may lessen unintended effects of the automatic semicolon insertion.<ref>{{cite book
|title=JavaScript: The definitive Guide
|url=https://archive.org/details/javascript00libg_297
|url-access=registration
|last=Flanagan
|first=David
|page=[https://archive.org/details/javascript00libg_297/page/n14 16]
|page=16
|quote=Omitting semicolons is not a good programming practice; you should get into the habit of inserting them.
|isbn=978-0-596-10199-2