function toFixed(num, mulriple = 1) {
     let course = Math.pow(10, mulriple);
     let result = num * course + 0.5;
     result = parseInt(result, 10) / course;
     return result;
}
Copy the code