title: Checking a parent container for children javascript
body: <p>Just wondering how you can check an element (i.e. a div container) for elements (i.e. buttons) and if they exist, remove them?</p>
  
  <p>If I append a child to a div, how can I on the next look check for that child or those type of children? i.e. adding; </p>
  
  <pre class="lang-js prettyprint-override"><code>example = document.getElementById('div');  
  example.appendChild(aButton);
  
  //loop to look for aButton / button type in example div
  </code></pre>
  
  <p>Cheers</p>