前端计算百分比,现在是要748除以805,现在算出来直接是Infinity,要怎么才能正常取值?
const arr1 = ((cumulativeElectric / 10) / (monthElectric / 10)).toFixed(2) * 100 + "";
console.log(Math.round(arr1 * 100) / 100);
const arr1 = ((cumulativeElectric / 10) / (monthElectric / 10)).toFixed(2) * 100 + "";
console.log(Math.round(arr1 * 100) / 100);