Storing Values with the Assignment Operator lessons

Tell us what’s happening:

Your code so far


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

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 7.0; Redmi Note 4 Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.137 Mobile Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/storing-values-with-the-assignment-operator/


var a = 7;
var b = a;

You just need to set what var a is equal to and then set b equal to a. No need to declare that both are equal to 7. Also remember not to change code above the second comment to pass.

1 Like

a and b are already declared (with var), you shouldn’t declare them again. Don’t use var again.

Also, you shouldn’t edit the code above the comment that say to edit only below it, I suggest resetting