title: Javascript: Round up to the next multiple of 5
body: <p>I need a utility function that takes in an integer value (ranging from 2 to 5 digits in length) that rounds up to the <strong>next</strong> multiple of 5 instead of the <strong>nearest</strong> multiple of 5. Here is what I got:</p>
  
  <pre><code>function round5(x)
  {
      return (x % 5) &gt;= 2.5 ? parseInt(x / 5) * 5 + 5 : parseInt(x / 5) * 5;
  }
  </code></pre>
  
  <p>When I run <code>round5(32)</code>, it gives me <code>30</code>, where I want 35.<br>
  When I run <code>round5(37)</code>, it gives me <code>35</code>, where I want 40.  </p>
  
  <p>When I run <code>round5(132)</code>, it gives me <code>130</code>, where I want 135.<br>
  When I run <code>round5(137)</code>, it gives me <code>135</code>, where I want 140.  </p>
  
  <p>etc...</p>
  
  <p>How do I do this?</p>