Created
October 2, 2017 18:56
-
-
Save KimSarabia/2220153b1c5b2ec9a86e250dae17e6e7 to your computer and use it in GitHub Desktop.
Finding the minimum in an array
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 characters
//Source: https://stackoverflow.com/questions/8934877/obtain-smallest-value-from-array-in-javascript | |
Array.min = function( array ){ | |
return Math.min.apply( Math, array ); | |
}; | |
var minimum = Array.min(array); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment