Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clarify usage of return values in iterator protocol (mdn#37511)
* Clarify usage of return values in iterator protocol There's an example with an iterable that returns an iterator that enumerates 1, 2, and returns with `{done: true, value: 3}`, and is evaluated with `const [b, c, d] = obj`. It takes a careful reading to notice that the third value is used only to ensure that the iterator is exhausted and that the value from the iterator return is not bound to `d`. * Update files/en-us/web/javascript/reference/iteration_protocols/index.md --------- Co-authored-by: Joshua Chen <[email protected]>
- Loading branch information