The toLocaleString() function of number object return string with language specific representation of this number. Use it for example to get display language specific number.
Syntax
num.toLocaleString([locales [, options]])
<DOCTYPE html>
<html>
<head>
<script type="text/javascript">
var num= 123644;
//US specifc
document.write(num.toLocaleString() + "</br>");
//German specific
document.write(num.toLocaleString('de-DE') + "</br>");
//India specifc
document.write(num.toLocaleString('en-IN') + "</br>");
</script>
</head>
<body>
</body>
</html>
<DOCTYPE html>
<html>
<head>
<script type="text/javascript">
var num= 123644.4342;
//US specifc
document.write(num.toLocaleString('en-US',{ style: 'currency', currency: 'USD' }) + "</br>");
//German specific
document.write(num.toLocaleString('de-DE', { style: 'currency', currency: 'EUR' }) + "</br>");
//India specifc
document.write(num.toLocaleString('hi-IN',{ style: 'currency', currency: 'INR' }) + "</br>");
</script>
</head>
<body>
</body>
</html>