title: Randomly select value form array and delete this value from array
body: <p>Trivial question. What I have so far <a href="http://jsfiddle.net/Dth2y/1/" rel="nofollow">http://jsfiddle.net/Dth2y/1/</a></p>
  
  <p>Task, the next button should randomly select a value from the array and remove that value from the array.  So far this called the getNames function, within this function the value randomly selected from the array should be removed too after being appended to the html. </p>
  
  <p>HTML</p>
  
  <pre><code>&lt;h1 id="name"&gt;Click Next To Start&lt;/h1&gt; &lt;button id="next"&gt;NEXT NAME&lt;/button&gt; &lt;button&gt;SKIP NAME&lt;/button&gt;
  </code></pre>
  
  <p>​</p>
  
  <p>JS</p>
  
  <pre><code>     $(document).ready(function() {
       var names = [
           "Paul",
           "Louise",
           "Adam",
           "Lewis",
           "Rachel"
       ];
  
       function getNames() {
          return names[Math.floor(Math.random() * names.length)];
  
       }
  
               $("#next").click(function() {
                   $('#name').text(getNames())
  
       });
   });
  </code></pre>
  
  <p>​</p>
  
  <p>I have seen similar questions using the splice method, I have tried to hack a version together but am wondering if there's a more efficient way.</p>