When you declare a variable in the memory, how will you refer to it? You use an identifier to refer to your variable. An identifier is simply a name that is used to reference a variable (or as we are going to see, other programming constructions like functions), so in our example we have three Identifiers that refer to our three variables:
var firstValue = 10;
var secondValue = 23;
var result = firstValue + secondValue;
The identifier firstValue is the name of the variable that stores the value 10 in the memory. The identifier secondValue is the name of the variable that stores the value 23 in the memory. The result is the name of the variable that stores the value 10 (of the variable firstValue) plus the value 23 (of the variable secondValue). So we use identifiers to name our programming constructions.
Note that you declare a variable using the keyword var followed by the variable identifier. We will talk about variables and data types in the next article.
We have used the var keyword to declare a variable, followed by the variable identifier, then its value (134). Save the file and load it in your IE Browser. You will get the following error message: