JSFiddle - React, Tailwind, and code Playground

HTML

<div id="a"></div>
<br/>
<div id="b"></div>
<br/>
<div id="c"></div>

JavaScript

var n = 12.30 + 626.175;
$('#a').text(n);
$('#b').text("Rounded value:  "+n.toFixed(2));
$('#c').text("Should be:  "+638.475.toFixed(2));