The following is transferred from: http://blog.csdn.net/hongweigg/article/details/38090093
1. Question: In JavaScript, typeof (undefined) = = undefined established?
Answer: Not true, the global function typeof () returns a value type of string type , six possible values: "Number", "string", "Boolean", "Object", "function", and "undefined".
Only typeof (undefined) = = "undefined";
is set up.
2, typeof (null) = = ' undefined ' established?
Answer: Not valid, NULL is the object type of data, so typeof (null) = = ' object ' is established.
3, typeof ([up]) = = ' array ' Set up?
Answer: No, the typeof () return value does not have an "array" type, nor is there a "date" type.
4, undefined = = undefined set up?
Answer: Set up.
5, NULL = = NULL set up?
Answer: Set up.
6, Nan = = Nan set up?
Answer: not set up. NaN is not equal to any value, including itself. To detect if a value is NaN, use the isNaN function.
7, typeof (NaN) = = ' number ' Set up?
Answer: Set up. Nan is the data that belongs to number type.
Finally, NULL is the data of type Object, Nan is the data of type number, undefined is the data of type undefined, that is, there is no definition, the properties and methods of the object or object cannot be found.
Special comparisons such as Undefined,nan in JavaScript