Not awesome b is already declared, you don’t need to declare it again with var. var a = var b is a syntax error, you can’t use var in the value you are assigning to a variable.
Also, the challenge is asking you to assign the content of a to the variable b, remember you assign what is to the right of the assignment operator = to the variable to the left of it.
assume that ‘is’ is equal to ‘=’ operator
var a is an empty container
var b is a container containing 2
// Only change code below this line
a and b is already containers and no need to make them container using var
put something into container just like in b
put the container ‘a’ into container ‘b’
done
the declaring part of the process is pretty simple:
var a;
is all that is required to declare a variable. That’s it. Once declared, it exists, doesn’t need to be re-declared.
Now the second part is where that variable is assigned a value. That can look like this:
a = 7;
That assigns the integer 7 into my variable a (or it initializesa with the value of 7). The two CAN be combined, but only the first time - once a variable has been declared, remember, it doesn’t need to be done again. So we can combine them like this:
var a = 7;
This sets aside the variable’s space (declares the variable), and assigns it a value (initializes the variable). We can do that with both a and b, works fine.
Later on, however, you are being told to assign the value of b into a. It’s an assignment, and a has already been declared (the variable name already exists). So how do we assign a value? Look above, where I set it to 7. We can set it to anything, even the value of another array:
var foo = "one";
var bar = "two"
// later on, I want to set foo to the value of bar:
foo = bar; // <-- I didn't use var or anything, as they both already exist!