JavaScript Tutorial #02 Syntax

Posted at: May 4, 2019 3:41 PM

In this lesson we will learn basic syntax of JavaScript.

The syntax of JavaScript is the set of rules that define a correctly structured JavaScript program.

Case sensitivity

JavaScript is case sensitivity. Lower-case and upper-case letter is different variable or function.

Whitespace

Spaces, tabs and newlines used outside of string constants are called whitespace. JavaScript Ignore the whitespace. You can use spaces, tabs and newlines in your programs.

Semicolons

Semicolons terminate the statement. It is optional. Some statements that are well formed when a newline is parsed will be considered complete. The statement should be terminated with a semicolon.

With Semicolons

Without Semicolons

Above both code is working fine.

Comments

Comment syntax is the same as in C++ and many other languages.

You can watch video on JavaScript Tutorial #02 Syntax


javascript tutorial javascript syntax whitespace in javascript semicolons in javascript javascript case sensitivity

Please leave comments

0 Comments

truecodex launched free android app. You can download and install truecodex app on your mobile and get notification of the latest post.

Video Tutorials on YouTube