title: on click highlight div
body: <p>I am trying to highlight a certain div by adding a class 'active' when it is clicked and remove the class 'active' from all the other divs that had was clicked with and have an active class.</p>
  
  <p>Only one div can have the active class at a time</p>
  
  <pre><code>let i = 0;
      for (; i &lt; list_wrapper.children.length; i++) {
          console.log(list_wrapper.children[i]);
          list_wrapper.children[i].addEventListener('click', function () {
              if (this.className.indexOf('active') === -1) {
                  this.classList.add('active');
              }
              if (this.className.indexOf('active') &gt; -1) {
                  // this.classList.remove('active');
                  console.log(list_wrapper.children)
              }
  
          })
  
      }
  </code></pre>