title: How can I generate a random number within a range but exclude some?
body: <p>Basically I pick a random number between 0-24:</p>
  
  <pre><code>Math.floor(Math.random() * myArray.length); // myArray contains 25 items
  </code></pre>
  
  <p>Lets say it comes out to be 8. Now I want to get another number in the same range 0-24 but this time, I do not want an 8.  The next time, I might roll a 15.  Now I want to roll again but I don't want an 8 or 15.  The way I am handling this now is by using do while loops and if the number comes out the same, I just reroll.</p>
  
  <p>This is a small portion of my homework and I, in fact, have it working to meet all the requirements so I guess you could say this is for my own personal benefit so I can write this properly and not end up on "the daily wtf".</p>