JavaScript null and undefined

• undefined means “no value” (neither primitive nor object). Uninitialized variables,
missing parameters, and missing properties have that nonvalue. And functions
implicitly return it if nothing has been explicitly returned.
• null means “no object.” It is used as a nonvalue where an object is expected (as a
parameter, as a member in a chain of objects, etc.).

貌似我之前理解反了。

原文地址:https://www.cnblogs.com/lambdatea/p/3660467.html