You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 8, 2024. It is now read-only.
`.indexed` takes no arguments. It returns an iterator where each value produced by the underlying iterator is paired with a counter, starting at 0 and increasing by 1 with every element produced.
139
-
140
-
Returns an iterator of pairs.
141
-
142
-
#### Example
143
-
144
-
```JavaScript
145
-
constabc= ["a", "b", "c"].values();
146
-
147
-
constresult= abc
148
-
.indexed();
149
-
result.next(); // {value: [0, "a"], done: false};
150
-
result.next(); // {value: [1, "b"], done: false};
151
-
result.next(); // {value: [2, "c"], done: false};
152
-
```
153
-
154
136
### `.flatMap(mapperFn)`
155
137
156
138
`.flatMap` takes a mapping function as an argument. It returns an iterator that produces all elements of the iterators produced by applying the mapping function to the elements produced by the underlying iterator.
0 commit comments