Please i need help, i cant seem to pass it

Tell us what’s happening:

Your code so far

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

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

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36.

Challenge: Assigning the Value of One Variable to Another

Link to the challenge:

  1. You have declared var a twice. A variable can only be declared once.
  2. You have assigned b to equal to 7. The requirement is to asign var iable to variable.
  3. The variable that you are assigning to should be on the left.

Hey! I remember this JS problem back when I was doing it and I was stuck too. What seemed to be something so simple was driving me insane… The answer is really simple! If you haven’t figured it out yet, I would just go back and re-read the challenge and retry your code… In the “Setup” section, your variables are already setup. The challenge is to assign the content of variable a to variable b.

If myVar = 5;
myNum = myVar (5);


a = 7
b = ?

Note that variables don’t need to be redeclared.

I hope this helps!

Tnx a lot
figured i just needed to concentrate more

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