title: How to round up number to nearest 100/1000 depending on number, in JavaScript?
body: <p>I have a number that can be in the 2 digits, like 67, 24, 82, or in the 3 digits, like 556, 955, 865, or 4 digits and so on. How can I round up the number to the nearest n+1 digits depending on the number?</p>
  
  <p>Example: </p>
  
  <pre><code>roundup(87) =&gt; 100,
  roundup(776) =&gt; 1000,
  roudnup(2333) =&gt; 10000
  </code></pre>
  
  <p>and so on. </p>