title: Cannot set property 'textcontent' of null
body: <p>for some reason with this I get the error: Cannot set property 'textcontent' of null for this line:</p>
  
  <pre><code> document.getElementById("days").textContent = d;
  </code></pre>
  
  <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>function countdown() {
    var now = new Date();
    var eventDate = new Date(2018, 1, 19);
    var currentTime = now.getTime();
    var eventTime = eventDate.getTime();
    var remTime = eventTime - currentTime;
    var s = Math.floor(remTime / 1000);
    var m = Math.floor(s / 60);
    var h = Math.floor(m / 60);
    var d = Math.floor(h / 24);
    h %= 24;
    m %= 60;
    s %= 60;
    h = (h &lt; 10) ? "0" + h : h;
    m = (m &lt; 10) ? "0" + m : m;
    s = (s &lt; 10) ? "0" + s : s;
  
    document.getElementById("days").textContent = d;
    document.getElementById("days").innerText = d;
  
    document.getElementById("hours").textContent = h;
  
    document.getElementbyId("minutes").textContent = m;
  
    document.getElementById("seconds").textContent = s;
  }
  countdown();</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;li&gt;
    &lt;span class="value"&gt;Ends in:
      &lt;/span&gt;
    &lt;p id="days"&gt;30&lt;/p&gt;
    &lt;p id="hours"&gt;10&lt;/p&gt;
    &lt;p id="minutes"&gt;5&lt;/p&gt;
    &lt;p id="seconds"&gt;1&lt;/p&gt;
  &lt;/li&gt;</code></pre>
  </div>
  </div>
  </p>