Answers for "find the maximum number of the array in javascript"

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
1

how to find max number in array javascript

const array1 = [1, 3, 2];
console.log(Math.max(...array1));
Posted by: Guest on June-22-2020

Code answers related to "find the maximum number of the array in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language