The JavaScript keyword null is a special value that indicates no value.null is usually considered a special value of object typea value that represents no object.
When a variable holds the value null, you know that it does not contain a valid object, array, number, string, or boolean value
null代表着没有值
undefined is returned when you use either a variable that has been declared but never had a value assigned to it or an object property that does not exist.
undefined代表着两种情况:申明了变量却没有赋值;对象的属性不存在。
Since both null and the undefined value indicate an absence of value, this equality is often what we want. However, if you truly must distinguish between anull value and an undefined value, use the === identity operator or thetypeof operator
对于一个不存在的值来说,undefined和null是一样的效果。如果你一定要区分是null和undefined的话,你可以用操作符=== 或者是typeof。null的类型是object而undefined的类型确是undefined