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