Finding if an element is childless
<p>I have an array that contains all elements on the page. How would I test if an element is childless while looping through the array? I would prefer to stay with standard javascript. Here is pseudocode that explains it:</p>

<pre><code>for each element in elementlist:
    if element is childless:
        do something
    else:
        do something different
</code></pre>
