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"))
2.1m questions
2.1m answers
60 comments
57.0k users