Answers for "maximum number of an array"

2

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);
});
Posted by: Guest on October-22-2020
0

maximum number of an array

var arr = [1, 2, 3];
var max = Math.max(...arr);
Posted by: Guest on May-22-2021

Code answers related to "maximum number of an array"

Browse Popular Code Answers by Language