LILLY ROBOT |
The Number object contains several properties and methods. We can use the properties and methods without declaring the Number object.
Property | Explanation |
---|---|
MAX_VALUE | largest positive number in JavaScript |
MIN_VALUE | smallest positive number in JavaScript |
NaN | means not a number |
NEGATIVE_INFINITY | represent the value of negative infinity |
POSITIVE_INFINITY | represent the value of positive infinity |
Method | Explanation |
---|---|
Number() | Object constructor |
toString() | converts numbers to string - you can use a radix, which is optional, inside the parentheses |
toExponential(decimals) | converts numbers to a string in exponential notation |
toFixed(decimals) | converts numbers to a string using fixed point notation |
toPrecision(decimals)() | converts a number to a string - rounded to the specified number of significant digits |
Displays
Displays
Displays
Displays
Displays