Cannot read property 'textContent' of undefined
<p>I am trying to create an animated logo 
inspiration : <a href="http://codepen.io/pavlunya/pen/OPmVem" rel="nofollow noreferrer">http://codepen.io/pavlunya/pen/OPmVem</a></p>

<p>I am getting error when I use <code>document.getElementById</code> instead of <code>document.getElementsByTagName</code></p>

<p><a href="https://jsfiddle.net/c8x33crr/" rel="nofollow noreferrer">Jsfiddle</a></p>

<p>Thanks in advance for help </p>