title: Remove event listener (keydown)
body: <p>How to remove <code>eventlistener</code> in code below. This is an example but exactly the same I want to do in my project and it doesn't work.</p>
  <p>Here is the code:</p>
  <pre><code>const removeClick = document.querySelector('.remove-click');
  let border = 1;
  
  borderBtn.addEventListener('keydown', (e) =&gt; changeBorder(e));
  
  function changeBorder(e) {
     if (e.keyCode === 17) {
        borderBtn.style.border = `${++border}px solid black`;
        if (border === 6) {
           removeEvent();
        }
     }
  }
  
  function removeEvent() {
     borderBtn.removeEventListener('keydown', changeBorder)
  }
  </code></pre>