As you know, a script is executed line by line downward exactly as we read English. Take a look at the following English sentences:
Bring a piece of paper.
Bring a pen.
Write "Hello Dear."
When we read these sentences, we write them downward, or if they are all in the same line we will begin with the first one, then the second one, then the third and so on. A sentence in English has meaning; say "Bring me a piece of paper" to your friend, for instance, and he will give you a piece of paper. The sentence is terminated by the full stop symbol (.).
var x = 2 + 1;
A Fast Look at Variables
To be able to continue with our discussion about the concepts in this article we must take a fast look at variables. The script statements (instructions) have to work on data; this is what programming is all about. We need a way to store data in the memory and operate on it.
A variable is a block of memory that is used to store data. It is called a variable because the value that's stored inside it can be changed.