I really do not understand what i'm asked to do

Tell us what’s happening:
i already assigned a to b with =

Your code so far


// Setup
var a;
a = 7;
var b;

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


Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36 OPR/71.0.3770.284.

Challenge: Assigning the Value of One Variable to Another

Link to the challenge:

1 Like

Hey,
You just need to assign the a var into b. Both of them are already initialized so there’s no need to initialize them again as you do. Just leave the last line only.

hey, that didn’t work

Oh sorry, I thought it was b = a; . That’s the correct, because you pass the content of the var a into var b that way.

Hello @BigBabyBoy. The reason you are not passing is because there are too many unnecessary lines of code in your code. The challenge only tells you to assign the value of var a to var b.

// Only change code below this line
var a; // unnecessary line. Variables are already set for you.
b=7; // unnecessary line. You need to assign the value of var a to b
var b; // unnecessary line. Variables are already set for you.
a = b; // The challenge tells you to assign the value of var a to b. But, you did the opposite. It should be b = a;

Happy Coding!

The challenge is asked to assign the value of ‘a’ to variable ‘b’. var a, and var b are already declared by the setup. So no need of declaring them again. just assign the value of ‘a’ to variable ‘b’. Keep in mind that the values are assigned from right to left.
The following code line is just enough.
b = a;