The Math max() static method returns the largest of the numbers given as input parameters, or -Infinity if there are no parameters.
console.log(Math.max(1, 3, 2));
// 3
console.log(Math.max(-1, -3, -2));
// -1
const numbers = [1, 3, 2];
console.log(Math.max(...numbers));
// 3