title: Creating an Array of Id's
body: <p>I have an array, <code>var players = ['', '', '', '', '', ''];</code>. Now I want that array to contain 6 items from a list:</p>
  
  <pre><code>    &lt;ul id="Available Players"&gt;
          &lt;li id="node7"&gt;Player A&lt;/li&gt;
          &lt;li id="node8"&gt;Player B&lt;/li&gt;
          &lt;li id="node9"&gt;Player C&lt;/li&gt;
          &lt;li id="node10"&gt;Player D&lt;/li&gt;
          &lt;li id="node11"&gt;Player E&lt;/li&gt;
          &lt;li id="node12"&gt;Player F&lt;/li&gt;
      &lt;/ul&gt;
  </code></pre>
  
  <p>Now, I want the array to look kinda like this:
  <code>var players = [.node7, .node8, .node9, .node10, .node11, .node12];</code>. Also, if I were to create a new array called <code>round1</code>, can I get the values of the first 4 values from the <code>players</code> array? It should look somewhat similar to this: <code>var round1 = [players[0], players[1], players[2], players[3]];</code></p>
  
  <p>So how can I do all of this?</p>