mozilla

Compare Revisions

Number

Change Revisions

Revision 417627:

Revision 417627 by Sheppy on

Revision 428763:

Revision 428763 by orcus on

Title:
Number
Number
Slug:
Web/JavaScript/Reference/Global_Objects/Number
Web/JavaScript/Reference/Global_Objects/Number
Tags:
"Number", "JavaScript Reference", "JavaScript"
"Number", "JavaScript Reference", "JavaScript"
Content:

Revision 417627
Revision 428763
nn159      Example: Integer range for <code>Number</code>
160    </h3>
161    <p>
162      The following example shows minimum and maximum integer val
 >ues that can be represented as <code>Number</code> object (for de
 >tails, refer to EcmaScript standard, chapter <em>8.5 The Number T
 >ype</em>):
163    </p>
164    <pre class="brush: js">
165var biggestInt = 9007199254740992;
166var smallestInt = -9007199254740992;
167</pre>
168    <p>
169      When parsing data that has been serialized to JSON, integer
 > values falling out of this range can be expected to become corru
 >pted when JSON parser coerces them to <code>Number</code> type. U
 >sing <code>String</code> instead is a possible workaround.
170    </p>
171    <h3 id="Example:_Using_Number_to_convert_a_Date_object" name=
 >"Example:_Using_Number_to_convert_a_Date_object">
159      Example: Using <code>Number</code> to convert a <code>Date<172      <span style="display: none;">&nbsp;</span>Example: Using <c
>/code> object>ode>Number</code> to convert a <code>Date</code> object
tt492    <div id="cke_pastebin" style="position: absolute; top: 2173.9
 >2px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">
493      &nbsp;
494    </div>

Back to History