it is most common to use
null in places where an object should be but one can’t be created or found, and it is most common to find
undefined when you have a variable that hasn’t been initialized, or an object with a missing property, or an array with a missing value.
- 7. Types, Equality, Conversion and All That Jazz: Serious types
- Publisher: O'Reilly Media, Inc.
- Released: March 2014
Where would you get "null" and where would you get "undefined"?