title: Make sliding text disappear as it reaches bottom of div
body: <p>I have a div with id="text" that I am adding text to:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var el = document.getElementById('text');
  var p1 = document.createElement('p');
  p1.appendChild(document.createTextNode('text to be inputted.'));
  el.insertBefore(p1, el.childNodes[0] || null);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="text"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>After inputting multiple lines of text, I want the older text at the bottom of the div to disappear.</p>
  
  <p>Can I do this using a max number in the el.childNodes[] array?
  Or will I have to use collision detection as the text reaches the bottom of the div?
  Thanks!!!</p>