convert number to 2 decimal places code example
Example: route number to 2 decimal number
var round = (num,numOfDecimal=2)=>{
const numofdic = Math.pow(10,numOfDecimal)
return Math.round(num * numofdic) / numofdic;
}
var round = (num,numOfDecimal=2)=>{
const numofdic = Math.pow(10,numOfDecimal)
return Math.round(num * numofdic) / numofdic;
}