title: Random integer in a certain range excluding one number
body: <p>I would like get a random number in a range excluding one number (e.g. from 1 to 1000 exclude 577). I searched for a solution, but never solved my issue.</p>
  
  <p>I want something like:</p>
  
  <pre><code>Math.floor((Math.random() * 1000) + 1).exclude(577);
  </code></pre>
  
  <p>I would like to avoid <code>for</code> loops creating an array as much as possible, because the length is always different (sometimes 1 to 10000, sometimes 685 to 888555444, etc), and the process of generating it could take too much time.</p>
  
  <p>I already tried:</p>
  
  <ul>
  <li><p><a href="https://stackoverflow.com/questions/19451425/javascript-generating-random-numbers-in-a-range-excluding-certain-numbers">Javascript - Generating Random numbers in a Range, excluding certain numbers</a></p></li>
  <li><p><a href="https://stackoverflow.com/questions/5520835/how-can-i-generate-a-random-number-within-a-range-but-exclude-some">How can I generate a random number within a range but exclude some?</a></p></li>
  </ul>
  
  <p>How could I achieve this?</p>