Multiple choice technology

How do you round the number 7.25, to the nearest integer?

  1. round(7.25)

  2. Math.rnd(7.25)

  3. Math.round(7.25)

  4. rnd(7.25)

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

Math.round() is the correct JavaScript method to round a number to the nearest integer. Options A and D are missing the Math. prefix, and option B uses the non-existent rnd() function.