const balance=1254.1 ;
const lockBalance=392.28;
const upBalance1 = balance - lockBalance
const upBalance = (balance*3 - lockBalance*3)/3
console.log(upBalance1) //861.8199999999999
console.log(upBalance) //861.82
const balance=1254.1 ;
const lockBalance=392.28;
const upBalance1 = balance - lockBalance
const upBalance = (balance*3 - lockBalance*3)/3
console.log(upBalance1) //861.8199999999999
console.log(upBalance) //861.82
本文标题:去除JS运算加减时多出现N个小数点
本文链接:https://www.haomeiwen.com/subject/wekwlctx.html
网友评论