mozilla

Compare Revisions

Array.prototype.sort()

Change Revisions

Revision 436213:

Revision 436213 by nebulon on

Revision 436689:

Revision 436689 by nebulon on

Title:
Array.prototype.sort
Array.prototype.sort
Slug:
Web/JavaScript/Reference/Global_Objects/Array/sort
Web/JavaScript/Reference/Global_Objects/Array/sort
Tags:
"Array", "Array methods"
"Array", "Array methods"
Content:

Revision 436213
Revision 436689
n97    if (a.name > b.name) {n97    if (a.name > b.name)
n99    } else if (a.name < b.name) {n99    if (a.name < b.name)
t101    } else {t101    // a must be equal to b
102      return 0;102    return 0;
103    }

Back to History