Pulling class elements into an array and then summing them up
<p>I'm extremely new to Javascript and I need some help to do this. The classes will be pulling from different tables (like below). I just need a way to pull all the cell values out of each class and sum them up. So classone = 1234 + 1234. I'm confused as to whether document.getElementByClassName works? Any help would be appreciated. </p>

<pre><code>&lt;table&gt;
&lt;tbody&gt;
   &lt;tr&gt;&lt;td class="classone"&gt;1234&lt;/td&gt;&lt;/tr&gt;
   &lt;tr&gt;&lt;td class="classtwo"&gt;1234&lt;/td&gt;&lt;/tr&gt;
   &lt;tr&gt;&lt;td class="classthree"&gt;1234&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;


&lt;table&gt;
&lt;tbody&gt;
   &lt;tr&gt;&lt;td class="classone"&gt;1234&lt;/td&gt;&lt;/tr&gt;
   &lt;tr&gt;&lt;td class="classtwo"&gt;1234&lt;/td&gt;&lt;/tr&gt;
   &lt;tr&gt;&lt;td class="classthree"&gt;1234&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
</code></pre>
