Welcome to the Treehouse Community
Looking to learn something new?
why is this incorrect? var timeRemaining = 0;
the question was to fill in the blank below, showing the variable timeRemaining and not to put any values.. var[blank];
Hi Jessica, basically 0 is still a value, so
var example = 0 ... you're placing the number 0 in the variable.
To make an empty variable just add nothing, literally. var example;
var timeRemaining; console.log('"var timeRemaining" is of the type: ' + typeof(timeRemaining)) // undefined timeRemaining = 0; console.log('"timeRemaining = 0" is of the type: ' + typeof(timeRemaining)) // number timeRemaining = 'hello'; console.log('"timeRemaining = \'hello\'" is of the type: ' + typeof(timeRemaining)) // string
Try running the above code to double check and see how the type of timeRemaining changes depending on what you do or do not assign to it. :)