JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://getfirebug.com/firebug-lite-debug.js"></script>
JavaScript
console.log("-1.4 rounds to " + (Number(-1.4).toFixed(0) ));
console.log("-0.4 rounds to " + (Number(-0.4).toFixed(0) ));
console.log("0.4 rounds to " + (Number(0.4).toFixed(0) ));
console.log("1.4 rounds to " + (Number(1.4).toFixed(0) ));
console.log("-0.4 rounded and subtracted becomes "+ (Number(-0.4).toFixed(0) -0));