var DanBike = "Honda PCX";
To declare a variable you use the
var keyword which tells the browser that the text to follow is the name of a new variable. A semicolon must end the statement!
A variable represents or hold a value.
Let’s consider the very commonly use example
x = 2. The name of the variable would be
x and its value would be
2. The value of a variable can be changed at any given time simply by giving
x a new assignment. For example
x = 4.
Consider the following math problem:
If x = 2, then 3 + x = ?