You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
callbackfn should be a function that takes four arguments. reduce calls the callback, as a function, once for each element present in the array, in ascending order.
The callback function is called N - 1 times, where N is the number of elements in the array (when initialValue is not present).
callbackfn should be a function that takes four arguments. reduceRight calls the callback, as a function, once for each element present in the array, in descending order.
The text was updated successfully, but these errors were encountered:
The algorithm (below this text) is accurate. This text (slightly misleading in that it's incomplete) is only in the Note 1, which is only informal (aka non-normative) human description.
@fpelliccioni Nice catch! It'd be a great next step if you want to write a pull request against the spec (in spec.html of this repository) with fixed non-normative text. I really appreciate your help; in my opinion, the non-normative text is a really important part for users and implementers to be able to understand the spec.
At 22.1.3.19 Array.prototype.reduce ( callbackfn [ , initialValue ] )
The callback function is called N - 1 times, where N is the number of elements in the array (when initialValue is not present).
Same error at 22.1.3.20 Array.prototype.reduceRight ( callbackfn [ , initialValue ] )
The text was updated successfully, but these errors were encountered: