I solved this! it should be
var a;
var a = 7;
var b = a
just a not var a
I don’t know what I am doing wrong!
Your code so far
// Setup
var a;
var b = 2;
// Only change code below this line
var a;
var a = 7;
var b = var a;
**Your browser information:**
User Agent is: <code>Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36</code>.
**Link to the challenge:**
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/storing-values-with-the-assignment-operator/
//declaration a = undefined, since you dont declared a value for the variable
var a;
//declaration b = 2; (it create the variable and assigned 2 to it in the same line of code
var b = 2;
//declares the same variable a so it destroy the old and create a new one a = undefined
var a;
// now create a new variable a and it equals to 7
var a = 7;
//now create a new b variable that replace the old one and assign to it var a,
//since var a make a new a variable whit valor undefined then b = undefined
var b = var a;
everytime you declare a variable like var x; javascript give it the value undefined