JSFiddle - React, Tailwind, and code Playground
JavaScript
var i = '1201.59';
var re = /(?=\B(?:\d{3})+(?!\d))/g;
var j = i.toString().replace( re, ' ' ).replace('.', ',');
alert(j)
var i = '1201.59';
var re = /(?=\B(?:\d{3})+(?!\d))/g;
var j = i.toString().replace( re, ' ' ).replace('.', ',');
alert(j)