Skip to content

Commit

Permalink
Correction to Iterator.prototype.flatMap()'s callback return type (#3…
Browse files Browse the repository at this point in the history
…3475)

* Correction to Iterator.prototype.flatMap()'s callback return type

* Update files/en-us/web/javascript/reference/global_objects/iterator/flatmap/index.md

---------

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
  • Loading branch information
mb21 and Josh-Cena committed May 19, 2024
1 parent 08dfcad commit b9c5849
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ flatMap(callbackFn)
### Parameters

- `callbackFn`
- : A function to execute for each element produced by the iterator. It should return an iterator or iterable that yields elements to be yielded by `flatMap()`, or a single non-iterator/iterable value to be yielded. The function is called with the following arguments:
- : A function to execute for each element produced by the iterator. It should return an iterator or iterable that yields elements to be yielded by `flatMap()`. Note that unlike {{jsxref("Array.prototype.flatMap()")}}, you cannot return single non-iterator/iterable values. The function is called with the following arguments:
- `element`
- : The current element being processed in the array.
- `index`
Expand Down

0 comments on commit b9c5849

Please sign in to comment.