Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Find the maximum number of an array js

var arr = [1, 2, 3];
var max = arr.reduce(function(a, b) {
  return Math.max(a, b);
});
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #Find #maximum #number #array #js
ADD COMMENT
Topic
Name
3+5 =