MDN may have intermittent access issues April 18 13:00 - April 19 01:00 UTC. See whistlepig.mozilla.org for all notifications.

mozilla

Compare Revisions

Array.prototype.sort()

Change Revisions

Revision 508:

Revision 508 by Yuichirou on

Revision 509:

Revision 509 by 1212jtraceur on

Title:
Array sort method
Array sort method
Slug:
JavaScript/Reference/Global_Objects/Array/sort
JavaScript/Reference/Global_Objects/Array/sort
Tags:
Array
Array
Content:

Revision 508
Revision 509
n68      <li>If <code>compareFunction(a, b)</code> is less than 0, sn68      <li>If <code>compareFunction(a, b)</code> is less than 0, s
>ort <code>b</code> to a lower index than <code>a</code>.>ort <code>a</code> to a lower index than <code>b</code>.
t76      <li>If <code>compareFunction(a, b)</code> is greater than 0t76      <li>If <code>compareFunction(a, b)</code> is greater than 0
>, sort <code>b</code> to a higher index than <code>a</code>.>, sort <code>b</code> to a lower index than <code>a</code>.

Back to History