Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js highest number in array

var arr = [1, 2, 3];
var max = arr.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
1+5 =