Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

wording change to the simple description in the note #27

Merged
merged 1 commit into from
Nov 24, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions spec.emu
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ location: https://tc39.es/proposal-array-grouping/
<emu-clause id="sec-array.prototype.groupby">
<h1>Array.prototype.groupBy ( _callbackfn_ [ , _thisArg_ ] )</h1>
<emu-note>
<p>_callbackfn_ should be a function that accepts three arguments and returns a value that is coercible to a property. `groupBy` calls _callbackfn_ once for each element in the array, in ascending order, and constructs a new object of arrays, where the property key is the return value and array is filled with the items that return that property key.</p>
<p>_callbackfn_ should be a function that accepts three arguments. `groupBy` calls _callbackfn_ once for each element in the array, in ascending order, and constructs a new object of arrays. Each value returned by _callbackfn_ is coerced to a property key, and the associated element is included in the array in the constructed object according to this property key.</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>`groupBy` 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 Expand Up @@ -61,7 +61,7 @@ location: https://tc39.es/proposal-array-grouping/
<emu-clause id="sec-array.prototype.groupbymap">
<h1>Array.prototype.groupByMap ( _callbackfn_ [ , _thisArg_ ] )</h1>
<emu-note>
<p>_callbackfn_ should be a function that accepts three arguments and returns any value. `groupByMap` calls _callbackfn_ once for each element in the array, in ascending order, and constructs a new Map of arrays, where the key is the return value and array is filled with the items that return that key.</p>
<p>_callbackfn_ should be a function that accepts three arguments. `groupByMap` calls _callbackfn_ once for each element in the array, in ascending order, and constructs a new Map of arrays. Each value returned by _callbackfn_ is used as a key in the Map, and the associated element is included in the array in the constructed Map according to this key.</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>`groupByMap` 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