I have the following function
function custRound(x,places) {
return (Math.round(x*Math.pow(10,places)))/Math.pow(10,places)
}
Can someone help edit this that it should always return a number with 2 decimal points. (.3 should become .30) and if possible put the , in where it belongs.
function custRound(x,places) {
return (Math.round(x*Math.pow(10,places)))/Math.pow(10,places)
}
Can someone help edit this that it should always return a number with 2 decimal points. (.3 should become .30) and if possible put the , in where it belongs.