// Here we are declaring a variable
//Now we can assign a value to our newly created variable
myName = ‘Johny Lever’;
Variable may also contain numeric values as in the below example:
myAge = 20;
Hint; Don’t use hyphens in the variable names: those are not allowed.
Changing the value of a variable:
changeName = ‘Johny’;
ChangeName = ‘Stevens’;
Now calling our variable ‘changeName’ anywhere in the script, we shall get the second value assigned to it.
The above call within JS would bring about ‘Stevens’ and not ‘Johny’.