Declaring a variable without assigning a value versus declaring a variable and assigning it to nothing

Declaring a variable without assigning a value versus declaring a variable and assigning it to nothing
0.0 0

#1

Is there there a difference between these two variable declarations?

var answer;

var answer = " ";

I look forward to a response from anyone. Thank you.


#2

The first declaration gives answer a value of undefined.

The second declaration (initialization) assigns answer a space character for a value.


#3

The first one is a null initial value. (correction: undefined)
The second one is a string, albeit empty string.


#4

Ok. I get it. Thanks.


#5

The question looks trivial. I am a newbie in javascript - still coming up. Thanks for the response though. This is clear now.