Multiple choice technology

How do you find the number with the highest value of x and y?

  1. top(x,y)

  2. Math.ceil(x,y)

  3. ceil(x,y)

  4. Math.max(x,y)

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

Math.max(x, y) returns the largest of zero or more numbers. Option B (Math.ceil) rounds up to the nearest integer but doesn't compare values. Options A and C are non-existent functions.