Format snippets
This commit is contained in:
@ -3,7 +3,7 @@ title: indexOfAll
|
||||
tags: array,intermediate
|
||||
---
|
||||
|
||||
Returns all indexes of `val` in an array.
|
||||
Finds all indexes of `val` in an array.
|
||||
If `val` never occurs, returns an empty array.
|
||||
|
||||
- Use `Array.prototype.reduce()` to loop over elements and store indexes for matching elements.
|
||||
|
||||
Reference in New Issue
Block a user