What does `Math.round(4.5)` return?

JavaScript Professional Easy

JavaScript Professional — Easy

What does `Math.round(4.5)` return?

Key points

  • `Math.round()` rounds a number to the nearest integer
  • 4.5 is closer to 5 than to 4
  • The result of `Math.round(4.5)` is 5

Ready to go further?

Related questions