Multiple choice technology web technology

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

  1. Math.rand(10.75)

  2. Math.round(10.75)

  3. rnd(10.75)

  4. Math.rnd(10.75)

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

The standard JavaScript Math object provides the Math.round(x) method to round a number to the nearest integer. Other options like Math.rand, rnd, or Math.rnd are not valid built-in JavaScript functions for rounding.