JavaScript syntax: Difference between revisions

Content deleted Content added
Tag: Reverted
Tags: Reverted possible vandalism
Line 54:
// a = b + c(d + e).foo();
</syntaxhighlight>
Try this example code on [[https://jsonlinecompiler.com/javascript-online-editor/ JavaScript online compiler & Editor]].
 
with the suggestion that the preceding statement be terminated with a semicolon.
 
Line 66 ⟶ 68:
// (d + e).foo();
</syntaxhighlight>
Try this example code on [[https://jsonlinecompiler.com/javascript-online-editor/ JavaScript online compiler & Editor]].
 
Initial semicolons are also sometimes used at the start of JavaScript libraries, in case they are appended to another library that omits a trailing semicolon, as this can result in ambiguity of the initial statement.
 
Line 80 ⟶ 84:
// return a + b;
</syntaxhighlight>
Try this example code on [[https://jsonlinecompiler.com/javascript-online-editor/ JavaScript online compiler & Editor]].
 
===Comments===