title: Remove unique random items from array, then refill to restart the process?
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var myArray = ['A','B','C'];
  document.getElementById("button").onclick = function() {
      if (myArray.length &gt; 0) {
        var a = Math.floor(Math.random() * myArray.length);
        var b = myArray.splice(a, 1);
        document.getElementById("showRand").innerHTML = b[0];
      } else { 
        //restart
      }
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;button id="button"&gt;click&lt;/button&gt;
  &lt;div id="showRand"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>Onclick, it randomly emptying myArray, how to refill the array then repeat the process when myArray is empty?</p>
  <p>Thanks for your help..</p>