Conversation
Preview URLsFlawsNone! 🎉 External URLsURL: No new external URLs (this comment was updated 2021-11-22 18:12:02.257109) |
wbamberg
left a comment
There was a problem hiding this comment.
Thanks @hamishwillee ! I think this is better! I found a few issues and had a couple of other suggestions.
files/en-us/web/javascript/reference/global_objects/array/reduce/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/javascript/reference/global_objects/array/reduce/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/javascript/reference/global_objects/array/reduce/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/javascript/reference/global_objects/array/reduce/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/javascript/reference/global_objects/array/reduce/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/javascript/reference/global_objects/array/reduce/index.md
Outdated
Show resolved
Hide resolved
Co-authored-by: wbamberg <will@bootbonnet.ca>
|
Thanks. Ready for re-review! |
wbamberg
left a comment
There was a problem hiding this comment.
Thanks for the updates @hamishwillee ! The description of the arguments, especially the tables, need to be updated given we have different array values now.
files/en-us/web/javascript/reference/global_objects/array/reduce/index.md
Outdated
Show resolved
Hide resolved
| call being as follows: | ||
| The callback would be invoked four times, with the arguments and return values in each call being as follows: | ||
|
|
||
| <table class="standard-table"> |
There was a problem hiding this comment.
If the array is const array = [15, 16, 17, 18, 19];, then the values in this table need to be updated.
|
|
||
| The value returned by `reduce()` would be that of the last callback | ||
| invocation (`10`). | ||
| The value returned by `reduce()` would be that of the last callback invocation (`35`). |
There was a problem hiding this comment.
Thanks @wbamberg . Both fixed. Wish I had a good excuse.
Fixes #10524
This is not precisely a "fix" but is a slight improvement to Array.prototype.reduce() that fell out of the discussion (i.e. that issue is not actually a bug, but did make us think we could improve this).
What this does:
A really thorough fix might be to replace the spec inclusion in the description with hand written text. I could do that, and I think it would be good, but there are things I consider higher value at this point.