JavaScript Objects The Number Object- toLocaleString() - Javascript Objects

What is JavaScript Number - toLocaleString()?

The above method converts a number object into a string that is readable by human which represents the number using the locale of the environment.

Syntax:

The syntax of toLocaleString( ) is as follows −

Return Value:

Returns a string that is readable, representing the number using the locale of the environment.

Example:

Try the following example.

Output:

177.1234


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Javascript Objects Topics