01

In JavaScript, Math.max() is a method

In JavaScript, Math.max() is a method that returns the largest number from a given set of numbers.

Syntax:

javascript

Copy

Edit

Math.max(number1, number2, ...);

Accepts multiple numbers as arguments.

Returns the largest number.

If no arguments are given, it returns -Infinity.

If any argument is not a number (NaN), it returns NaN.

Write a comment ...

Write a comment ...