title: While loop going forever
body: <p>I have a while that keeps running even if the condition is met which is <code>el.tagName !== 'H2'</code> 
  I do not know why it's still running after it finds the closest Header which in this case is H2. You can view the codepn here <a href="https://codepen.io/theMugician/pen/wQjJjj" rel="nofollow noreferrer">https://codepen.io/theMugician/pen/wQjJjj</a></p>
  
  <pre><code>function grabClosestHeader (el) {
  
      var parent = el.parentNode;
      el = parent.firstChild;
      while (el.tagName !== 'H2') {
  
          el = el.nextSibling;
          console.log(el);
          if( el != null &amp;&amp; el.tagName === 'H2') {
              console.log('This is the H2 Tag');
          }
          if (el === null) {
              console.log('This is NULL');
  
              parent = parent.parentNode;
              el = parent.firstChild;
          }
  
      }
  
  
      // Then return the matched element
      console.log(el.tagName);
      return el;
  }
  </code></pre>