Object.prototype.toLocaleString()

  • Revision slug: JavaScript/Reference/Global_Objects/Object/toLocaleString
  • Revision title: toLocaleString
  • Revision id: 190271
  • Created:
  • Creator: Yuichirou
  • Is current revision? No
  • Comment

Revision Content

Summary

Returns a string representing the object. This method is meant to be overriden by derived objects for locale-specific purposes.

Method of Object
ECMA Version: ECMA-262 Edition 3

Syntax

toLocaleString()

Parameters

None.

Description

Object's toLocaleString returns the result of calling toString.

This function is provided to give objects a generic toLocaleString method, even though not all may use it. Currently, only Array, Number, and Date override toLocaleString.

See also

toString

{{ languages( { "ja": "ja/Core_JavaScript_1.5_Reference/Global_Objects/Object/toLocaleString", "pl": "pl/Dokumentacja_j\u0119zyka_JavaScript_1.5/Obiekty/Object/toLocaleString" } ) }}

Revision Source

<p>
</p>
<h3 id="Summary" name="Summary"> Summary </h3>
<p>Returns a string representing the object. This method is meant to be overriden by derived objects for locale-specific purposes.
</p>
<table class="fullwidth-table">
<tbody><tr>
<td class="header" colspan="2">Method of <a href="en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></td>
</tr>
<tr>
<td>ECMA Version:</td>
<td>ECMA-262 Edition 3</td>
</tr>
</tbody></table>
<h3 id="Syntax" name="Syntax"> Syntax </h3>
<p><code>
toLocaleString()
</code>
</p>
<h3 id="Parameters" name="Parameters"> Parameters </h3>
<p>None.
</p>
<h3 id="Description" name="Description"> Description </h3>
<p><code>Object</code>'s <code>toLocaleString</code> returns the result of calling <code><a href="en/Core_JavaScript_1.5_Reference/Global_Objects/Object/toString">toString</a></code>.
</p><p>This function is provided to give objects a generic <code>toLocaleString</code> method, even though not all may use it. Currently, only <code>Array</code>, <code>Number</code>, and <code>Date</code> override <code>toLocaleString</code>.
</p>
<h3 id="See_also" name="See_also"> See also </h3>
<p><a href="en/Core_JavaScript_1.5_Reference/Global_Objects/Object/toString">toString</a>
</p>{{ languages( { "ja": "ja/Core_JavaScript_1.5_Reference/Global_Objects/Object/toLocaleString", "pl": "pl/Dokumentacja_j\u0119zyka_JavaScript_1.5/Obiekty/Object/toLocaleString" } ) }}
Revert to this revision