I need help assigning the contents of a to b by using =

Tell us what’s happening:

Your code so far


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

// Only change code below this line
var myVar;
myVar = 5;
var myNum; 
myNum = myVar; 
b = 7;



Your browser information:

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

Challenge: Assigning the Value of One Variable to Another

Link to the challenge:

The variables have already been declared. The requirement is for you to assign a to b. The equal sign is the assignment operator.

I’m not sure what this piece is doing. These lines should not be here.

Here, you should assign the contents of a to b, not the value that you happen to know was assigned to a.

1 Like