Sunday 9 August 2015

What is difference between undefined and Null


Null :Null is a special value meaning “no value” . Null is a special object because “type of Null” returns “object”.
Undefined  : Undefined means that the variable has not been declared  or has not been given a value.
   Ex: //  k is not declared anywhere in code.
                  Alert(typeof i);

No comments:

Post a Comment