function tofixed(str){ return parseInt(str * 1000 / 10) /100 } console.log(tofixed("2.346")) console.log(tofixed("2.3")) console.log(tofixed("4.246")) console.log(tofixed("4.1"))
1.4m articles
1.4m replys
5 comments
56.9k users