What is the difference between undefined value and null value ?

 Posted by Bharathi Cherukuri on 7/11/2012 | Category: JavaScript Interview questions | Views: 4085 | Points: 40

Following are the basic diferences between undefined value and null value.
(i)Undefined value cannot be explicitly stated i.e., there is no keyword called undefined whereas null value has keyword called null.
(ii)Typeof undefined variable or property returns undefined whereas type of null value returns object.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response