ES6 - toLocaleString()


Advertisements


This method converts a number object into a human readable string representing the number using the locale of the environment.

Syntax

number.toLocaleString()

Return Value

Returns a human readable string representing the number using the locale of the environment.

Example

var num = new Number(177.1234); 
console.log( num.toLocaleString()); 

Output

177.1234 

es6_number.htm

Advertisements