Storing Values with the Assignment Operator not passing

Tell us what’s happening:

The task not completing.

Your code so far

// Setup
var a;
var b = 2;

// Only change code below this line
var a, b = 7;
a = b;

I have tested this in the console and it works so not sure why the task isn’t competing here.

You don’t need to re-declare a or b. You want to just assign to b and nothing else. The second line of your solution is fine. What you’re doing still works, yes, but it’s doing unnecessary work, and it throws off the tests.

// Only change code below this line
a = 7; // Assign the value 7 to variable a.
b = a; // Assign the contents of a to variable b.

Please don’t just give the answer – people need to find their own way to the correct answer in order to learn.