In javascript any property that has not been assigned a value it is assigned as undefined
. There are two things you need to seperate to understand it, there are two Undefined "things" from ECMA-262 Standard:
- 4.3.9 undefined value
- 4.3.10 Undefined type
Undefined type
=> type whose sole value is the undefined value
undefined value
=> primitive value used when a variable has not been assigned a value
So in your case the variable is initialized and it has been assigned the undefined
value.
Also a premitive value in javascript is defined as:
4.3.2 primitive value
member of one of the types Undefined, Null, Boolean,
Number, or String as defined in Clause 8
NOTE: A primitive value is a datum that is represented directly at the
lowest level of the language implementation.