Created
March 13, 2018 11:26
-
-
Save thinkbigthings/494a61181d67d6427a1f46859ed60e38 to your computer and use it in GitHub Desktop.
This file contains 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 characters
// Math.max overflows if array is too big, use reduce instead | |
const fastMin = (array) => array.reduce( (a,b) => (a < b) ? a : b ); | |
const fastMax = (array) => array.reduce( (a,b) => (a > b) ? a : b ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment