12

Hard to believe some "experimented" js developers does not know this difference

Comments
  • 0
    Experimented != Good
  • 0
    is it because the data type? null is object. can you typeof the undefined?
  • 0
    Typeof undefined === 'undefined' ;
  • 0
    With js you really are better off comparing that kinda stuff with what you think it should be rather that testing that it's just not undefined. Effectively you're half enforcing typing instead of checking definededness if that's a word
  • 0
    null == undefined (they are equivalent)
    null === undefined (they are not exactly the same thing)
  • 0
    truthiness
Add Comment