Defaultjsvariables.md - brainchildservices/curriculum GitHub Wiki

Default values

if you are not assigning value then java runtime assigns default value to variable and when you try to access the variable you get the default value of the variable.

In computer programs, variables are often declared without a value. The value can be something that has to be calculated, or something that will be provided later, like user input.

A variable declared without a value will have the value undefined.

The variable carName will have the value undefined after the execution of this statement:

 var carName;