title: removeChild() is not defined
body: <pre><code>    &lt;script type=&quot;text/javascript&quot;&gt;
          function create() {
              var paragraph = document.createElement(&quot;p&quot;);
              var item = document.getElementById(&quot;toDo&quot;).value;
              paragraph.addEventListener(&quot;click&quot;, removeChild(paragraph));
              paragraph.innerHTML = item;
              document.body.appendChild(paragraph);
          }
      &lt;/script&gt;
      &lt;div&gt;
          &lt;h1&gt;To Do List&lt;/h1&gt;
          &lt;input type=&quot;text&quot; id=&quot;toDo&quot; placeholder=&quot;What To Do&quot;&gt;&lt;br&gt;
          &lt;button type =&quot;button&quot; onclick=&quot;create()&quot;&gt;Add&lt;/button&gt;
      &lt;/div&gt;
  </code></pre>
  <p>I was creating a To-Do List and I was having problems with removing the item. I tried
  setAttribute(&quot;onclick&quot;, removeChild(paragraph)) but that didn't seem to work. The error &quot;removeChild is not defined&quot; shows up every time. How can I fix this?</p>