<html>
<body>
<h1>JavaScript Numbers</h1>
<h2>The toLocaleString() Method</h2>
<p>toLocaleString() returns a number as a string, using local language format.</p>
<p>The options parameter (object) describes the formatting:</p>
<p id="demo"></p>
<script>
let num = 1000000;
let text = num.toLocaleString("jp-JP", {style:"currency", currency:"JPY"});
document.getElementById("demo").innerHTML = text;
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_tolocalestring_num_options1 by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 21 Dec 2022 17:39:12 GMT -->
</html>