La verdad es que no entiendo esto
var movementQuotient = 3
function cutDecimal(x) {
return Number.parseFloat(x).toFixed(2);
}
console.log(cutDecimal(movementQuotient))
Al ejecutar estas lineas el output es el esperado: 3.00
Pero al hacer esto, que tecnicamente es lo mismo
var movementQuotient = 3
function cutDecimal(x) {
return Number.parseFloat(x).toFixed(2);
}
cutDecimal(movementQuotient)
console.log(movementQuotient)
Por que ocurre esto? La funcion toFixed() me esta dando muchisimos problemas como este