mozilla

Revision 49339 of Number.prototype.toSource()

  • Revision slug: JavaScript/Reference/Global_Objects/Number/toSource
  • Revision title: toSource
  • Revision id: 49339
  • Created:
  • Creator: Waldo
  • Is current revision? No
  • Comment formatting fixes

Revision Content

Summary

Returns a string representing the source code of the object.

Method of Number
Implemented in: JavaScript 1.3

Syntax

var src = number.toSource();

Parameters

None.

Description

The toSource method returns the following values:

  • 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.toSource

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

Revision Source

<p>
</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/Objects/Number">Number</a></td>
</tr>
<tr>
<td>Implemented in:</td>
<td>JavaScript 1.3</td>
</tr>
</tbody></table>
<h3 name="Syntax"> Syntax </h3>
<pre class="eval">var src = <i>number</i>.toSource();
</pre>
<h3 name="Parameters"> Parameters </h3>
<p>None.
</p>
<h3 name="Description"> Description </h3>
<p>The <code>toSource</code> method returns the following values:
</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/Objects/Object/toSource">Object.toSource</a>
</p>
<div class="noinclude">
</div>
{{ wiki.languages( { "ja": "ja/Core_JavaScript_1.5_Reference/Global_Objects/Number/toSource" } ) }}
Revert to this revision