title: Javascript round up to nearest .5
body: <p>How can I round a number up to the nearest .5?  For example:  </p>
  
  <pre><code>5.4 -&gt; 5.5
  5.6 -&gt; 6
  6.1 -&gt; 6.5
  </code></pre>
  
  <p>Here is what I tried so far:</p>
  
  <pre><code>var number = 5.1;
  var roundednumber = Math.round(number*2)/2 
  </code></pre>