Multiple choice javascript

How do you find the largest number of 6 and 8?

  1. Math.max(6,8)

  2. top(6,8)

  3. ceil(6,8)

  4. Math.ceil(6,8)

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The Math.max() method returns the largest number from a list of arguments. Option A correctly uses Math.max(6,8) to find the larger value. ceil() rounds up to the next integer, it doesn't compare values, and there's no top() method in JavaScript.