Skip to content

Instantly share code, notes, and snippets.

@RyoSugimoto
Created October 7, 2014 09:35
Show Gist options
  • Save RyoSugimoto/69406d6882e7ca2a6c36 to your computer and use it in GitHub Desktop.
Save RyoSugimoto/69406d6882e7ca2a6c36 to your computer and use it in GitHub Desktop.
配列に格納されている数値の最大値(最小値)を返す。
function getMax (array) {
return Math.max.apply(null, array);
}
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