Round a float up to the next integer in javascript

前端 未结 4 2077
北海茫月
北海茫月 2020-12-10 00:46

I need to round floating point numbers up to the nearest integer, even if the number after the point is less than 0.5.

For example,

  • 4.3 should be 5 (no
4条回答
提交回复
热议问题