I need some help with this code

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 = 7;
var myNum;
b = myVar;
a = b

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36.

Challenge: Assigning the Value of One Variable to Another

Link to the challenge:

Welcome, orange.

Do you have a question?

If so, please edit your post to include it in the Tell us what’s happening section.

The more information you give us, the more likely we are to be able to help.

Get rid of all the myVar and myNum stuff. That is just example code demonstrating how variables are assigned values from other variables. You don’t want to copy/paste that into your solution. I recommend you click the “Reset All Code” button to give yourself a fresh start.

Now look at the example code to see what it is doing. Do you understand what is going on there? After the last line, what would the value of myNum be? If you understand this then the solution to this exercise is pretty easy. How would you put the value of a in to variable b?