Number.prototype.toSource()

  • Revision slug: JavaScript/Reference/Global_Objects/Number/toSource
  • Revision title: toSource
  • Revision id: 49341
  • Created:
  • Creator: Sevenspade
  • Is current revision? No
  • Comment tagging as non-standard

Revision Content

{{ Non-standard_header() }}

Summary

Returns a string representing the source code of the object.

Method of Number
Implemented in: JavaScript 1.3

Syntax

number.toSource()

Parameters

None.

Description

The toSource method returns the following values:

This shouldn't be here, but until reorganization where pages are moved to their proper places, the title of this article is ambiguous, so it can stay. After reorganization, this should be removed.

  • For the built-in Number object, toSource returns the following string indicating that the source code is not available:
function Number() {[native code]}
  • For instances of Number, toSource returns a string representing the source code.

This method is usually called internally by JavaScript and not explicitly in code.

See Also

Object.prototype.toSource

{{ languages( { "ja": "ja/Core_JavaScript_1.5_Reference/Global_Objects/Number/toSource" } ) }}

Revision Source

<p>
{{ Non-standard_header() }}
</p>
<h3 name="Summary"> Summary </h3>
<p>Returns a string representing the source code of the object.
</p>
<table class="fullwidth-table">
<tbody><tr>
<td class="header" colspan="2">Method of <a href="en/Core_JavaScript_1.5_Reference/Global_Objects/Number">Number</a></td>
</tr>
<tr>
<td>Implemented in:</td>
<td>JavaScript 1.3</td>
</tr>
</tbody></table>
<h3 name="Syntax"> Syntax </h3>
<p><code><i>number</i>.toSource()</code>
</p>
<h3 name="Parameters"> Parameters </h3>
<p>None.
</p>
<h3 name="Description"> Description </h3>
<p>The <code>toSource</code> method returns the following values:
</p><p><span class="comment">This shouldn't be here, but until reorganization where pages are moved to their proper places, the title of this article is ambiguous, so it can stay. After reorganization, this should be removed.</span>
</p>
<ul><li> For the built-in <code>Number</code> object, <code>toSource</code> returns the following string indicating that the source code is not available:
</li></ul>
<pre class="eval">function Number() {[native code]}
</pre>
<ul><li> For instances of <code>Number</code>, <code>toSource</code> returns a string representing the source code.
</li></ul>
<p>This method is usually called internally by JavaScript and not explicitly in code.
</p>
<h3 name="See_Also"> See Also </h3>
<p><a href="en/Core_JavaScript_1.5_Reference/Global_Objects/Object/toSource">Object.prototype.toSource</a>
</p>
<div class="noinclude">
</div>
{{ languages( { "ja": "ja/Core_JavaScript_1.5_Reference/Global_Objects/Number/toSource" } ) }}
Revert to this revision