Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upIssues with "Array.prototype.reduce" and "Array.prototype.reduceRight" #744
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
getify
Dec 5, 2016
Contributor
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.
|
The algorithm (below this text) is accurate. This text (slightly misleading in that it's incomplete) is only in the |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
littledan
Dec 6, 2016
Member
@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.
|
@fpelliccioni Nice catch! It'd be a great next step if you want to write a pull request against the spec (in |
fpelliccioni commentedDec 5, 2016
•
edited
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 ] )