0
I think my question is silly, but I never got to take that test. has some way to recover the value so 10.90 with zero without using function or replace, I have tried here more unsuccessfully!
var total = 10.90;
totalreal = parseInt(total)
totalrealF = parseFloat(total)
totalrealN = Number(total)
document.write(
'R$ ' + totalreal + '<br>' +
'R$ ' + totalrealF + '<br>' +
'R$ ' + totalrealN + '<br>' +
'R$ ' + total + '<br>'
);
exit
R$ 10
R$ 10.9
R$ 10.9
R$ 10.9
desired
R$ 10.90
total.toFixed(2);
– MarceloBoni