How do you round the number 8.25, to the nearest whole number?
-
Math.rnd(8.25)
-
Math.round(8.25)
-
round(8.25)
-
rnd(8.25)
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.