Skip to content

Commit

Permalink
Editorial: simplify note for Array.prototype.every (#3246)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangenming authored and ljharb committed Feb 17, 2024
1 parent 5188ef1 commit 80de2f9
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 @@ -38849,7 +38849,7 @@ <h1>Array.prototype.entries ( )</h1>
<emu-clause id="sec-array.prototype.every">
<h1>Array.prototype.every ( _callbackfn_ [ , _thisArg_ ] )</h1>
<emu-note>
<p>_callbackfn_ should be a function that accepts three arguments and returns a value that is coercible to a Boolean value. `every` calls _callbackfn_ once for each element present in the array, in ascending order, until it finds one where _callbackfn_ returns *false*. If such an element is found, `every` immediately returns *false*. Otherwise, if _callbackfn_ returned *true* for all elements, `every` will return *true*. _callbackfn_ is called only for elements of the array which actually exist; it is not called for missing elements of the array.</p>
<p>_callbackfn_ should be a function that accepts three arguments and returns a value that is coercible to a Boolean value. `every` calls _callbackfn_ once for each element present in the array, in ascending order, until it finds one where _callbackfn_ returns *false*. If such an element is found, `every` immediately returns *false*. Otherwise, `every` returns *true*. _callbackfn_ is called only for elements of the array which actually exist; it is not called for missing elements of the array.</p>
<p>If a _thisArg_ parameter is provided, it will be used as the *this* value for each invocation of _callbackfn_. If it is not provided, *undefined* is used instead.</p>
<p>_callbackfn_ is called with three arguments: the value of the element, the index of the element, and the object being traversed.</p>
<p>`every` does not directly mutate the object on which it is called but the object may be mutated by the calls to _callbackfn_.</p>
Expand Down

0 comments on commit 80de2f9

Please sign in to comment.