toLocaleString (Object - JavaScript)

Gets a string representation of an object taking into account the host locale.

Defined in

Object (JavaScript)

Syntax

toLocaleString() : string
Return value Description
string The string representation of the object.

Examples

This computed label displays the value of pi.
var o = new Object(Math.PI);
o.toLocaleString()