There are few things, which are the building blocks of your code:

Comments: Comments are human-readable (as opposed to JavaScriptinterpreter- readable) descriptions you can add to your script to make

your script easier to understand and maintain.

 Conditionals: Conditionals are logical constructs that you can add to your script to decide whether a particular condition is true or false at

runtime. The most basic conditional is if-else.

 Functions: Functions are named groups of statements that you define once, and then reuse to your heart’s content.

 Loops: Loops are specialized forms of conditionals. You can add a loop to your script that checks a particular condition multiple times, executing whatever JavaScript code you like, until that condition becomes true or false. Common examples of loops include the for, while, and do-while

loops.

 Operators: Operators are the JavaScript answer to conjunctions. Operators include the commas, periods, and other symbols that you use to

compare and assign values to variables.

 Variables: Variables are named placeholders that represent the bits of data that you work with in your scripts.

 

 


Like it on Facebook, Tweet it or share this article on other bookmarking websites.

No comments