Created
October 7, 2014 09:35
-
-
Save RyoSugimoto/69406d6882e7ca2a6c36 to your computer and use it in GitHub Desktop.
配列に格納されている数値の最大値(最小値)を返す。
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
function getMax (array) { | |
return Math.max.apply(null, 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
function getMin (array) { | |
return Math.min.apply(null, array); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment