Math.max
Math.min
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: