Storing Values with the Assignment Operator - understanding requested

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:**

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.

1 Like

Thank you that help a lot!