Storing Values with the Assignment Operator how to do this i tried all

Tell us what’s happening:

Your code so far

// Setup
var a;
var b = 2;

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

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.79 Safari/537.36.

Link to the challenge:

variable a is already defined. To assign a value just write without the var keyword; just like this:


is it not possible a = b because I did this but got eRRoR

You are not asked to assign a to b not 7 to b or b to a. That’s what you did. And as @Lahsini said the two variables are already declared using var. Don’t need to declare again.

ok dude copied that; thanks