-4
I would like to convert this code it only ta appearing numbers with dot for example 8.66, 8, 8.95, 9...
i would like to leave in Brazilian real ex.: R$8,66
<script>
obj.totalCart = function() {
var totalCart = 0;
for(var item in cart) {
totalCart += cart[item].price * cart[item].count;
}
return Number(totalCart.toFixed(2));
}
</script>
Would that even more do not know where to put in this code
– user197627
In place of
toFixed
, put thetoLocaleString
– hkotsubo
This answers your question? Formatting Brazilian currency in Javascript
– Rebeca Nonato
I could not implement friend, sorry no javascript manjo
– user197627
I got brother worth!
– user197627