Travis build: 181
This commit is contained in:
@ -1464,8 +1464,7 @@ Use `Array.reduce()` to loop over elements and store indices for matching elemen
|
||||
Return the array of indices.
|
||||
|
||||
```js
|
||||
const indexOfAll = (arr, val) => (arr, val) =>
|
||||
arr.reduce((acc, el, i) => (el === val ? [...acc, i] : acc), []);
|
||||
const indexOfAll = (arr, val) => arr.reduce((acc, el, i) => (el === val ? [...acc, i] : acc), []);
|
||||
```
|
||||
|
||||
<details>
|
||||
|
||||
Reference in New Issue
Block a user