JSFiddle - React, Tailwind, and code Playground
HTML
<span id="num1"></span>
<span id="num2"></span>
<span id="num3"></span>
JavaScript
var num1 = "1";
document.getElementById('num1').innerHTML = (Math.round(num1 * 100) / 100).toFixed(2); // this is showing correctly
var num2 = "99.99999";
document.getElementById('num2').innerHTML = (Math.round(num2 * 100) / 100).toFixed(2);// this is incorrect=> I want to show 99.99