replace for money mask javascript code example
Example: javascript moeda reais
var atual = 600000.00;
//com R$
var f = atual.toLocaleString('pt-br',{style: 'currency', currency: 'BRL'}).replace(".", ",");
//sem R$
var f2 = atual.toLocaleString('pt-br', {minimumFractionDigits: 2}).replace(".", ",");