Number

  • Revision slug: Talk:JavaScript/Reference/Global_Objects/Number
  • Revision title: Number
  • Revision id: 141084
  • Created:
  • Creator: Jake Archibald
  • Is current revision? Yes
  • Comment 29 words added

Revision Content

Revision Source

<h3 id="JS1.2_.5B.5BDefaultValue.5D.5D" name="JS1.2_.5B.5BDefaultValue.5D.5D">JS1.2 <span class="nowiki">[[DefaultValue]]</span></h3>
<p>Missing here, and in <a href="/en/Core_JavaScript_1.5_Reference/Global_Objects/Array" title="en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Core JavaScript 1.5 Reference:Global Objects:Array</a> is mention of this JavaScript 1.2 behaviour:</p>
<pre class="eval"> Number([1,2,3]) === 3
</pre>
<p>The test suite mentions the reason being at <a class=" external" href="http://scopus.mcom.com/bugsplat/show_bug.cgi?id=123435" rel="freelink">http://scopus.mcom.com/bugsplat/show....cgi?id=123435</a> but I can't track that down. <a href="/User:Dleonard" title="User:Dleonard">Dleonard</a> 02:36, 7 May 2006 (PDT)</p>
<h3 id="toString(base)">toString(base)</h3>
<p>Need to document the base param of toString for numbers...</p>
<pre>var hexVal = (255).toString(16); // "ff"
</pre>
Revert to this revision