title: Finding child element of parent with JavaScript
body: <p>What would the most efficient method be to find a child element of (with class or ID) of a particular parent element using pure javascript only. No jQuery or other frameworks.</p>
  <p>In this case, I would need to find <strong>child1</strong> or <strong>child2</strong> of <strong>parent</strong>, assuming that the DOM tree could have multiple <strong>child1</strong> or <strong>child2</strong> class elements in the tree. I only want the elements of <strong>parent</strong></p>
  <pre class="lang-html prettyprint-override"><code>&lt;div class=&quot;parent&quot;&gt;
      &lt;div class=&quot;child1&quot;&gt;
          &lt;div class=&quot;child2&quot;&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>