Number Number operation

Number Number operation

Number Number operation

Function

Number prototype function provides number stringization, fixed-point formatting, scientific notation and base conversion capabilities.

API List

APIDescription
Number.lenReturns the number of characters after converting the number into a string.
Number.to_numberReturns the numeric value of the current number itself.
Number.to_fixedFormat a number to the specified decimal places.
Number.to_stringConvert a number to a string.
Number.to_radixFormat the integer into a string according to the specified base.
Number.to_charGenerates a single-character string in Unicode code points.
Number.to_exponentialFormat a number into a string in scientific notation.
Number.is_intDetermine whether the current number is an integer.
Number.is_floatDetermine whether the current number runtime type is Float.
Number.is_finiteDetermine whether the current number is a finite number.

Examples

Notes

  • Number method does not modify the original number value.