How to prevent round off of parseFloat
var input = "9999999999999999.99"
var num = +(parseFloat(input).toFixed())
document.getElementById("demo").innerHTML = num;
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Ranjit PowarRank #553 · 4.4K reputationPosted Sep 27, 2018, 3:00 AM EDT