Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

null vs undefined

//loosely equal (compare values between two variables)
null == undefined // true  ( null => 0 , undefined => NAN)

//strictly not equal (compare both type and value) 
null === undefined // false  (typeof null => object , typeof undefined => undefined)
null !== undefined // true   (typeof null => object , typeof undefined => undefined) 
 
PREVIOUS NEXT
Tagged: #null #undefined
ADD COMMENT
Topic
Name
1+5 =