[Edit]
+
0
-
0

js remove decimal places from number

1 2 3 4 5 6 7 8 9 10 11
const number = 1.234; const result = Math.round(number); // round the number to remove decimal places console.log(result); // 1 // More examples: console.log(Math.round(0.01)); // 0 console.log(Math.round(0.49)); // 0 console.log(Math.round(0.50)); // 1