Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Max Number from Array in JS

function arrayMax(array) {
  return array.reduce(function(a, b) {
    return Math.max(a, b);
  });
}

function arrayMin(array) {
  return array.reduce(function(a, b) {
    return Math.min(a, b);
  });
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Max #Number #Array #JS
ADD COMMENT
Topic
Name
7+2 =