Storing Values with the Assignment Operator - understanding requested

Storing Values with the Assignment Operator - understanding requested
0

#1

Tell us what’s happening:
I got it right but I would like if someone could explain to me why it works with b = a and not the other way around which is what I tried first. Also when I defined the last var it is in white font why is this and what does it represent. It did it with the wrong answer as well as the right one?

Your code so far

// Setup
var a;
var b = 2;

// Only change code below this line


**Link to the challenge:**
https://www.freecodecamp.org/challenges/storing-values-with-the-assignment-operator

#2

A variable is a representation of a memory location. Think of it as a container that “holds” some value. The assignment operator (the = symbol) puts a new value in that container.
a = 2 translates to "The variable a should hold the value 2". The number 2 is not affected by this.
b = a translates to "The variable b should hold the value that variable a is holding. The variable a is not affected by this. The variable b becomes a copy of the variable a.


#3

Thank you that help a lot!