Multiple choice javascript

How do you round the number 8.25, to the nearest whole number?

  1. Math.rnd(8.25)

  2. Math.round(8.25)

  3. round(8.25)

  4. rnd(8.25)

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

JavaScript's Math object provides the round() method for rounding numbers to the nearest integer. Option B uses the correct Math.round() method. Options A, C, and D either use non-existent methods or incorrect syntax - rnd() is not a valid JavaScript method.