The challenge instructions are:
Assign the value 7 to variable a.
Assign the contents of a to variable b.
When you declare a variable, you use the following syntax:
When you want to declare a variable and assign it an initial value (initializing a variable), you use the the following syntax:
var variableBeingInitialized = value;
When a variable has already been declared (var in front) and you want to assign a value to the variable, you use the following syntax:
variableBeingAssignedAValue = value;
You have var = 7; which results in a error, because you used var without specifying a variable name before the = operator.
Now, try to assign the number 7 to variable a. Hint: Variable a has already been declared (var a;)
Then, assign variable a to variable b. Hint: Variable already has a value of 2, so b is just a value of 2.