Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js highest number in array

function maxFromArray(array) {
  return array.reduce(function(a, b) {
    return Math.max(a, b);
  }, -Infinity);
}
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #js #highest #number #array
ADD COMMENT
Topic
Name
8+2 =