Multiple choice technology web technology

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

  1. rnd(7.25)

  2. round(7.25)

  3. Math.round(7.25)

  4. Math.rnd(7.25)

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

To round a number to the nearest integer in JavaScript, you use Math.round(). Option A's rnd() doesn't exist, option B's round() is not a built-in function, and option D's Math.rnd() is not a valid Math method.