Last active
December 22, 2020 17:19
-
-
Save ericelliott/e03558b5d5f8d1c82842f7744a2f3e89 to your computer and use it in GitHub Desktop.
Revisions
-
ericelliott revised this gist
Jan 30, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,3 @@ const filter = (fn, arr) => arr.reduce((newArr, item) => { return fn(item) ? newArr.concat([item]) : newArr; }, []); -
ericelliott revised this gist
Jan 28, 2017 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,3 @@ const filter = (fn, arr) => arr.reduce((newArr, item) => { return fn(item) ? [...newArr, item] : newArr; }, []); -
ericelliott created this gist
Jan 28, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ const filter = (fn, arr) => arr.reduce((newArr, item) => { if (fn(item)) return [...newArr, item]; return newArr; }, []);