Storing Values with the Assignment Operator 1

Storing Values with the Assignment Operator 1
0

#1

Tell us what’s happening:

Your code so far

var b=;
var b=a;
// Setup
var a;
var b = 2;

// Only change code below this line

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36.

Link to the challenge:


#2
var b =;

Will throw an error

//Uncaught SyntaxError: Unexpected token ;

Why because you are setting the value as semicolon for the variable, (assignment operator " = " )
Remember variables are name & value pairs,
if you intend to declare a variable without assigning it a value, you can write var b ;,
whereas you have declared another variable var a ; correctly.