Decimals and rounding
Guess the output · 1 of 3
Rounding three ways
1const price = 9.5;2console.log(Math.floor(price), Math.round(price), Math.trunc(-price));
What does this print?
Guess the output · 1 of 3
1const price = 9.5;2console.log(Math.floor(price), Math.round(price), Math.trunc(-price));
What does this print?