title: (How) Can I select all elements in an array exept a random an element selected by math.random?
body: <p>Hi guys I am decently new to programming and this is my first post on stackoverflow, I am working on a small game that involves random cards to be drawn from an array.</p>
  
  <p>Picture an array like this:</p>
  
  <pre><code>var cards = [document.getElementById("c1"),
           document.getElementById("2"),
           document.getElementById("3"),
           document.getElementById("4"),
          ];
  </code></pre>
  
  <p>Now I have the following code to generate the random variable from the array:</p>
  
  <pre><code>var randomNum = Math.floor((Math.random() * cards.length));
  </code></pre>
  
  <p>I use:</p>
  
  <pre><code>document.getElementById(randomNum);
  </code></pre>
  
  <p>to select the random variable.</p>
  
  <p>Now I want to select all the other variables in the array and give them the following code so there will only be one card displayed on screen at a time:</p>
  
  <pre><code>.style.display: "none";
  </code></pre>
  
  <p>Is this even possible? Thanks a lot!    </p>