Sanjay Dixit
What is the difference between undefined and null in JavaScript?
By Sanjay Dixit in JavaScript on May 13 2013
  • Bidyasagar Mishra
    Aug, 2019 2

    if we declare but not use then its undefined if we didnot declare then its null

    • 0
  • Guru Bandgar
    May, 2016 23

    1. console.log(a); /* undefined */var b;2. console.log(b); /* null */

    • 0
  • Abhijeet Gupta
    Nov, 2015 2

    In JavaScript, undefined means a variable has been declared but has not yet been assigned a value, null is an assignment value. It can be assigned to a variable as a representation of no value:

    • 0
  • Jaganathan Bantheswaran
    Nov, 2014 4

    undefined is a type itself (undefined) while null is an object.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS