Created
June 12, 2017 18:37
-
-
Save BeKnowDo/3349d00302de13f64d9c3d4e85491f4e to your computer and use it in GitHub Desktop.
Min/Max of 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
const Min = (array) => { | |
const min = Math.min(...array); | |
return min; | |
} | |
const Max = (array) => { | |
const max = Math.max(...array); | |
return max; | |
} | |
console.log(Max([4,3,2653,2,23,3,6,4])); | |
console.log(Min([4,3,2653,2,23,3,6,4])); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment