Assigning value of one variable to another

Tell us what’s happening:
Describe your issue in detail here.

Your code so far


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

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

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36

Challenge: Assigning the Value of One Variable to Another

Link to the challenge:

I would click the “Reset All Code” button to get a fresh start because you’ve added a bunch of stuff that you don’t need.

The instructions are “Assign the contents of a to variable b .”

The default code has already created both of these variables for you and has assigned a value to a. You just need to do one thing, assign the value of a to b. This is a one line solution, you don’t need any helper variables.

If you are still having problems then please be specific about what you don’t understand.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.