I have 84000000 and I want to display 84 000 000 in DOM.
var num = 84000000;
$('body').text(num.toLocaleString('fr-FR')); //gives 84000000 but
console.log(num.toLocaleString('fr-FR')); //gives 84 000 000
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
I get this:
Same thing in all browsers I have.
What is wrong? How to show 84 000 000 in DOM using.toLocaleString ?