Number
length number
name string
prototype object
parseInt(string, radix) function
Parse a string argument and return an integer of the specified radix (base). If the string does not start with a valid integer, return NaN. Leading whitespace is ignored.
string: The string to parse as an integer.
radix: An integer between 2 and 36 indicating the base of the number in the string.
Returns: The parsed integer, or NaN if the input is not a valid integer.
parseFloat(string) function
Parse a string argument and return a floating-point number. If the string does not represent a valid number, return NaN. Leading whitespace is ignored, and the string can include a decimal point or exponent.
string: The string to parse as a floating-point number.
Returns: The parsed number, or NaN if invalid.
isNaN(value) function
Determine if a value is the special numeric value NaN, without converting the argument. Unlike the global isNaN(), this returns false for non-numeric values.
value: The value to test.
Returns: True if the value is NaN, otherwise false.
isFinite(value) function
Determine if a value is a finite number. Unlike the global isFinite(), this returns false for non-numeric values without attempting to convert them.
value: The value to test.
Returns: True if the value is a finite number, otherwise false.
isInteger(value) function
Check if the given value is a finite number and also an integer (no fractional part). Returns false for non-numeric values or NaN.
value: The value to test.
Returns: True if value is an integer, otherwise false.
isSafeInteger(value) function
Check if the given value is a safe integer. A safe integer is one that can be exactly represented as an IEEE-754 double-precision number (i.e., between -9007199254740991 and 9007199254740991 inclusive).
value: The value to test.
Returns: True if value is an integer within the safe range, otherwise false.