End-of-line semicolons are optional. : Semicolon : Language Basics JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Language Basics » Semicolon »

 

End-of-line semicolons are optional.








JavaScript allows the developer to decide whether or not to end a line with a semicolon.

If the semicolon is not provided, JavaScript considers the end of the line as the end of the statement.








var test1 = "red"
var test2 = "blue";







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Language Basics
» Semicolon