While entering large number(999999999999990) it is showing wrong output

Author: sri95427Created Sep 15, 2021Updated Nov 4, 2023

Hi Team, Actually we have a scenario, we need to enter large amount like "999999999999990" so in this case the output we are getting is wrong "999,999,999,999,990.13" .

Could you please suggest possible solution for this.

<!DOCTYPE html>
<html>
<body>
<head>
<script src="//cdnjs.cloudflare.com/ajax/libs/numeral.js/2.0.6/numeral.min.js"></script>
</head>

<script>
function myFunction(value){
return numeral(value).format('0,0.00')
}

document.getElementById("demo").innerHTML = myFunction(999999999999990); 
</script>

</body>
</html>

Output: 999,999,999,999,990.13