From dedd2fdd0b8e3d5b10185d82f0579d2686313509 Mon Sep 17 00:00:00 2001 From: Robert Mennell Date: Mon, 8 Jan 2018 13:27:45 -0800 Subject: [PATCH] Update indexOfAll description forgot to update description --- snippets/indexOfAll.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snippets/indexOfAll.md b/snippets/indexOfAll.md index b3485f3c4..4ab0f913b 100644 --- a/snippets/indexOfAll.md +++ b/snippets/indexOfAll.md @@ -1,9 +1,9 @@ ### indexOfAll -Returns all indices of `val` in an array. If `val` never occurs, returns `[-1]`. +Returns all indices of `val` in an array. If `val` never occurs, returns `[]`. Use `Array.forEach()` to loop over elements and `Array.push()` to store indices for matching elements. -Return `[-1]` if `length` of the array of indices is `0`, otherwise return the array of indices. +Return the array of indices. ```js const indexOfAll = (arr, val) => {