title: How to add class with JS
body: <p>I have this code: </p>
  
  <pre><code>let link = document.querySelectorAll(".menu-left p a");
  for (var i =0;i&lt;link.length;i++){
    link[i].addEventListener("click", function () {
      this.classList.add('clicked')
    })
  }
  </code></pre>
  
  <p>I click on a link and I add "clicked" class on <code>&lt;a&gt;</code> tag. My issue is: when I click on the next link I want to remove de previous class, but this now doesn't happen. How to do this? What changes should I add in my code for getting the result?</p>