Number: Positive, negative, 0, decimal, NaN
Nan:not A number is not a valid digit but he is a numeric data type of
var num = 12;
12==12 comparison
var a= 12 Assignment;
IsNaN (); detects whether a value is a valid number if the proposition is true, is a valid number that returns FALSE, is not a valid number to return;
If the detected value is not of type number, the browser will default to convert it to type # and then determine if it is a valid digit
Console.log (IsNaN ("123")) returns the result is False
First convert "123" to Number = Number = number ("123")
Number () forces other data types to be converted to type #, which requires numbers in a string to be converted if they are strings
Number ("==>12") Number ("12px") ==>nan
Non-mandatory data type conversion parseint/parsefloat
Console.log (parseint ("12px"));
From left to right, a character search, the number is converted to a valid number, midway if you encounter a non-valid number, will not continue to find
Parsefloat () ibid.
JS Number Type