Assigning values to variables

Tell us what’s happening:
Describe your issue in detail here. I want to assign the contents of a to varible b. in Javascript. I keep getting errore message… // running tests You should not change code above the specified comment.

b    should have a value of 7
a    should be assigned to  b with =.

. // tests completed // console output ReferenceError: a is not defined ReferenceError: a is not defined


**Your code so far**

```js

var varA;
varA = 7;
var varB;
varB = varA;
varB = 7;

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0) 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:

This means exactly what it says, you should not make any changes to the default code that is above the comment

// Only change code below this line

Click the “Reset All Code” button to get a fresh start. Do not change any code above that comment. Then write one line of code below that comment that does what the instructions ask.

reset your code and notice that yiou changed code above the specified comment

Thanks a great deal.

Thanks once more…I got it.

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