title: Why would I combine Math.floor with Math.random?
body: <p>Why would anybody call <code>Math.floor</code> on a <code>Math.random</code> result? I've seen it used like:</p>
  
  <pre><code>Math.floor(Math.random() * num);
  </code></pre>
  
  <p>Can someone explain please?</p>