0
How could I round a number down to the ones place in JavaScript?
Is there a keyword or something?
2 Antworten
+ 10
Or if you want something like
3.14159 => 3.1
Have a look ~
https://www.sololearn.com/Discuss/264815/?ref=app
+ 5
To round down, use Math.floor or ~~ (e.g. ~~(3.141592653) = 3).
To round up, use Math.ceil.