title: How to get class names of table tds and write it to an array using jQuery?
body: <p>I have HTML table with three rows and three cells for each row. Each cell has class name. I want to get the class name of each cell and write it to array. </p>
  
  <p>HTML table:</p>
  
  <pre><code>&lt;table&gt;
      &lt;tr&gt;
          &lt;td class="O-marker"&gt;&lt;/td&gt;
          &lt;td class="O-marker"&gt;&lt;/td&gt;
          &lt;td class="X-marker"&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td class="X-marker"&gt;&lt;/td&gt;
          &lt;td class="O-marker"&gt;&lt;/td&gt;
          &lt;td class="X-marker"&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td class="X-marker"&gt;&lt;/td&gt;
          &lt;td class="O-marker"&gt;&lt;/td&gt;
          &lt;td class="O-marker"&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>When the <code>getBoard</code> function is called, then get all the class names of cells and write it to <code>board</code> array.</p>
  
  <pre><code>function getBoard() {
     var board = [];
     return board;
  }
  </code></pre>
  
  <p>I want to use jQuery and <code>.each()</code> method to get the class name and push the first character into the array <code>board</code>. Example. By the first character I mean (X or O).</p>