Multiple choice technology web technology

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

  1. round(7.25)

  2. Math.round(7.25)

  3. rnd(7.25)

  4. Math.rnd(7.25)

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

JavaScript's Math object provides a round() method. Option B (Math.round(7.25)) is correct. Options A, C, and D either omit the Math prefix or use non-existent methods.