I am having regular expression using following code
var data = 0.085;
var output = "$"+data.toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,');
console.log(output);
The problem is that it does not round off value 0.085
to 0.08
. I am allowed to use this regular expression.