index 2 decimal cases javascript 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;
}