Number Methods

JavaScript number methods are methods that can be used on numbers:

Method Description
toString() Returns a number as a string
toExponential() Returns a string, with a number rounded and written using exponential notation.
toFixed() Returns a string, with a number rounded and written with a specified number of decimals.
toPrecision() Returns a string, with a number written with a specified length
valueOf() Returns a number as a number

All number methods return a new value. They do not change the original variable.

Back Table of Contents Next