title: How do I clear the input field after I press enter?
body: <p>I have this section of code for a todo list and when I press Enter I want to clear the text in the input field.  Any idea how to do this?</p>
  <pre><code>document.addEventListener(&quot;keyup&quot;, function (event) {
      if (event.key === 'Enter') {
          var inputText = document.getElementById(&quot;the-input&quot;).value;
          var node = document.createElement(&quot;li&quot;);
          var textnode = document.createTextNode(`•${inputText}`);
          node.appendChild(textnode);
          document.getElementById(&quot;list&quot;).appendChild(node);
      }
  });
  </code></pre>