title: Generate random number between 000 to 999, and a single digit can only occur maximum of two times
body: <p>How can I generate numbers that range from 000 to 999? Also, a single digit can only occur maximum of two times in the same number.</p>
  
  <p>Examples of numbers I'd like to generate:</p>
  
  <pre><code>094
  359
  188
  900
  004
  550
  </code></pre>
  
  <p>Examples of numbers I <strong>don't</strong> want to generate:</p>
  
  <pre><code>000
  999
  444
  </code></pre>
  
  <p>What I've got so far:</p>
  
  <pre><code>function randomNumbers () {
    var one = Math.floor(Math.random() * 9) + 0;
    var two = Math.floor(Math.random() * 9) + 0;
    var three = Math.floor(Math.random() * 9) + 0;
  
    return '' + one + two + three;
  };
  </code></pre>
  
  <p>I know the code can be improved a lot, I just don't know how. Current function isn't checking if the same number occurs three times (should only occur a maximum of two).</p>
  
  <p>I can use jQuery in the project.</p>