Skip to content

Commit

Permalink
Editorial: drop mention of stability from Array.prototype.sort introd…
Browse files Browse the repository at this point in the history
…uction (tc39#3424)
  • Loading branch information
bakkot authored and ljharb committed Oct 10, 2024
1 parent ce4382c commit 6de33c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -39738,7 +39738,7 @@ <h1>Array.prototype.some ( _callback_ [ , _thisArg_ ] )</h1>

<emu-clause id="sec-array.prototype.sort" oldids="sec-sortcompare">
<h1>Array.prototype.sort ( _comparator_ )</h1>
<p>This method sorts the elements of this array. The sort must be stable (that is, elements that compare equal must remain in their original order). If _comparator_ is not *undefined*, it should be a function that accepts two arguments _x_ and _y_ and returns a negative Number if _x_ &lt; _y_, a positive Number if _x_ > _y_, or a zero otherwise.</p>
<p>This method sorts the elements of this array. If _comparator_ is not *undefined*, it should be a function that accepts two arguments _x_ and _y_ and returns a negative Number if _x_ &lt; _y_, a positive Number if _x_ > _y_, or a zero otherwise.</p>
<p>It performs the following steps when called:</p>
<emu-alg>
1. [id="step-array-sort-comparefn"] If _comparator_ is not *undefined* and IsCallable(_comparator_) is *false*, throw a *TypeError* exception.
Expand Down

0 comments on commit 6de33c0

Please sign in to comment.