Skip to main content Accessibility Feedback

Numbers

Math.max()

Returns the largest number from a set of numbers. Pass each number in as an argument.

// returns 42
Math.max(42, 3.14, 27);

// returns -3.14
Math.max(-42, -3.14, -27);

Works back to at least IE6.