I need to round a number up to two digits (NOTE: that I need a solution that support positive AND negative numbers) I'm currently using toFixed(2)
but that doesn't round it, I've Googled / Stack Overflow'ed but couldn't really find an answer for my situation:
const value = -0.004;
console.log(value.toFixed(2)); // 0.00
// Expected: -0.01
Anyone a clue? Keep safe.