Math.max and Math.min accept more than two arguments

2019-07-24

For example:

Math.max(1, 3, 2);
// Output: 3

Also this will work:

const array = [1,3,2];
Math.max(...array);
// Output: 3

See the Mozilla docs: