I feel like a 10 year old trying to learn the alphabet

Tell us what’s happening:
I think I’ve gottent the correct answer. I’ve declared “a” and assigned “a” the value 7.
I assigned “b” the value of “a” and thus “b” holds the value of 7 and has been assigned the contents of “a” with the line b = a;

Obiviosly I’m wrong somewhere but I really cant figure out where

Your code so far

// Setup
var a;
var b = 2;

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

Your browser information:

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

Challenge: Storing Values with the Assignment Operator

Link to the challenge:

Variables are first declared with the var keyword (or let or const, but you don’t need to worry about those yet).
Variables can only be declared once, so you want to make sure that you use the var keyword exactly once per variable.
After a variable has been declared, you can store a value in it by assigning.

You have correctly assigned the value of a to the variable b, but you tried to declare a twice.

You sort of are like a child learning the alphabet. That’s ok. You’ll be reading and writing soon.


Ok intersting I didnt know i could only declare a variable once thank you!

I am however still unable to pass this part.

a should be assigned to b with = .

For some reason it still says I have not assigned a to b

You’re missing your semicolons (;).

1 Like