Created
December 28, 2015 20:49
-
-
Save azakordonets/b2bb4254d6c7c363284a to your computer and use it in GitHub Desktop.
Get Max or Min from Javascript array
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
function getArrayMaxValue(arr) { | |
return Math.max.apply(null, arr); | |
} | |
function getArrayMinValue(arr) { | |
return Math.min.apply(null, arr); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment