title: How to overwrite text in <p> tag using JavaScript
body: <p>I want to <em>replace</em> the content of a <code>&lt;p&gt; tag</code> only with Vanilla JavaScript. I have something like</p>
  
  <pre><code>&lt;div
      className='container'&gt;
      &lt;p
          className='element' id='replace-me'&gt;&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And then I have a function like this</p>
  
  <pre><code>setInterval(function () {
      ...
      document.getElementById('replace-me').innerText(someVar)
  
  }, 1000);
  </code></pre>
  
  <p>That gives me the error: </p>
  
  <blockquote>
    <p>TypeError: document.getElementById(...).innerText is not a function</p>
  </blockquote>
  
  <p>Why is that?</p>