Number
This type is used to represent integers and floating-point values. The typeof operator can determine the type of number.
There is also a special value, NaN (non-numeric not a number), which is used to denote a case where an operand that would have returned a numeric value does not return a value (so that no error is thrown). For example, in other programming languages, dividing any number by 0 will result in an error, thereby stopping code execution. In JavaScript, however, any number divided by 0 returns Nan, so it does not affect the execution of other code.
The Nan itself has two unusual features. First, any operation involving Nan, such as NAN/10, will return Nan, a feature that can cause problems in a multi-step calculation. Second,nan is not equal to any value, including the Nan itself . For example, the following code returns false.
alert(NaN == NaN); //false
Array
The instanceof operator, which has something to do with object-oriented in JavaScript, is to understand this by first understanding the object-oriented JavaScript. Because this operator is the prototype object that detects whether the prototype chain of the object is pointing to the constructor.
var arr = [1,2,3,1];
Alert (arr instanceof Array); True
About JS (vi) How to tell if a variable is an array type? How do I tell if a variable is number type? (There are more than one)