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
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
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 declarea twice.
You sort of are like a child learning the alphabet. That’s ok. You’ll be reading and writing soon.