mozilla

Revision 316393 of Object.prototype.toLocaleString()

  • Revision slug: JavaScript/Reference/Global_Objects/Object/toLocaleString
  • Revision title: toLocaleString
  • Revision id: 316393
  • Created:
  • Creator: ethertank
  • 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

object.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

Revision Source

<h2 id="Summary" name="Summary">Summary</h2>

<p>Returns a string representing the object. This method is meant to be overriden by derived objects for locale-specific purposes.</p>
<table class="standard-table">
  <tbody>
    <tr>
      <td class="header" colspan="2">Method of <a href="/en-US/docs/JavaScript/Reference/Global_Objects/Object">Object</a></td>
    </tr>
    <tr>
      <td>ECMA Version:</td>
      <td>ECMA-262 Edition 3</td>
    </tr>
  </tbody>
</table>

<h2 id="Syntax" name="Syntax">Syntax</h2>
<pre class="syntaxbox"><code><var>object</var>.toLocaleString()</code></pre>

<h3 id="Parameters" name="Parameters">Parameters</h3>
<p>None.</p>


<h2 id="Description" name="Description">Description</h2>
<p><code>Object</code>'s <code>toLocaleString</code> returns the result of calling <code><a href="/en-US/docs/JavaScript/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>


<h2 id="See_also" name="See_also">See also</h2>
<ul>
<li><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Object/toString">Object.toString</a></li>
</ul>
Revert to this revision