It is said that the birth of JavaScript was very hasty and took more than 10 days. For this reason, regardless of the skill of the person who designs the JavaScript, the language will be flawed.
Which, NULL is actually a little chicken, it and undefined also often stirred together, let me very big head.
By looking at the information, the difference between null and undefined, I now have some understanding:
1 null represents an "None" object, when converted to a numeric value, 0;undefined is a primitive that represents "none" and is Nan when converted to a numeric value;
2 when the declared variable is not initialized, the default value of the variable is undefined;
3 null is used to denote a nonexistent object, commonly used to denote a function that attempts to return a non-existent variable;
4 undefined means "missing value"; null means "no object", that is, there should be no value at all.
The difference between null and undefined