title: How do I add a thousand seperator to a number in JavaScript?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/5731193/how-to-format-numbers-using-javascript">How to format numbers using javascript?</a>  </p>
  </blockquote>
  
  
  
  <p>I want to add a thousand seperator, like <code>.</code>, to a number in JavaScript.</p>
  
  <blockquote>
  <pre><code>1000 -&gt; 1.000
  1000000 -&gt; 1.000.000
  </code></pre>
  </blockquote>
  
  <p>What is the most elegant way to do that?</p>