JSFiddle - React, Tailwind, and code Playground
HTML
<div class="ln24"> <span class="upc grey-text sml">Cost for 2: </span>
Rs. 2000</div>
JavaScript
var s=2.855999999999;
alert(s.toFixed(3))
<div class="ln24"> <span class="upc grey-text sml">Cost for 2: </span>
Rs. 2000</div>
var s=2.855999999999;
alert(s.toFixed(3))