title: addEventListener('DOMContentLoaded'),function(){ - 2 arguments required, but only 1 present
body: <p>I am new to learning JavaScript and have been trying to learn DOM Manipulation to add and remove text from an input, but keep receiving a message in the Chrome console stating &quot;Uncaught TypeError: Failed to execute 'addEventListener' on 'EventTarget': 2 arguments required, but only 1 present.&quot;</p>
  <p>It is throwing the error on this first line:</p>
  <pre><code>document.addEventListener('DOMContentLoaded'),function(){
  </code></pre>
  <p>I thought it had to do with the end parenthesis after the event type, but when I try to remove it I get an &quot; ')' Expected&quot; syntax error message on my last line that does not resolve when I add the end parenthesis. Is this just a simple syntax error or is there something more going on with my code?</p>
  <pre><code>document.addEventListener('DOMContentLoaded'),function(){
  
      const list = document.querySelector('#movie-list ul');
      const forms = document.forms;
  
      list.addEventListener('click',(e)=&gt;{
          if(e.target.className == 'delete'){
              const li = e.target.parentElement;
              li.parentNode.removeChild(li);
  
          }
  
      });
  
      const addForm = forms['add-movie'];
      addForm.addEventListener('submit', function(e){
          e.preventDefault();
  
      const value = addForm.querySelector('input[type=&quot;text&quot;]').value;
      const li = document.createElement('li');
      const movieName = document.createElement('span');
      const deleteBtn = document.createElement('span');
      
          movieName.textContent = value;
          deleteBtn.textContent = 'delete';
      
          movieName.classList.add('name');
          deleteBtn.classList.add('delete');
      
          li.appendChild(movieName);
          li.appendChile(deleteBtn);
          list.appendChild(li);
      });
      
  }
  </code></pre>