title: Classlist validation for unique selected item
body: <p>So I'm trying to create a chat application like messenger.
  When I press the button, a new conversation should be started. I want to add a list item in my overview bar on the left but there can only be one selected, and that one has the 'history-item-selected' classname. So every new convo gets that classname, while the others ones get another classname to change it's appearance but it won't work.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const newConvoButton = document.getElementById("newmessage");
  const addNewConvo = (e) =&gt; {
    e.preventDefault();
    const myMessages = document.getElementById('history');
  
    let newListItem = document.createElement('li');
  
    newListItem.textContent = "user " + Math.floor(Math.random(2 - 100) * 100);
    myMessages.appendChild(newListItem);
  
    if (newListItem.classList = 'history-item-selected') {
      newListItem.classList.add('history-item-selected');
    } else {
      newListItem.classList.add('history-item')
    };
  };
  newConvoButton.addEventListener('click', addNewConvo);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;main&gt;
    &lt;div id="top"&gt;
      &lt;span&gt;
          &lt;h2&gt;My conversations&lt;/h2&gt;
        &lt;/span&gt;
      &lt;button type="submit" id="newmessage"&gt;+&lt;/button&gt;
    &lt;/div&gt;
  
    &lt;div id="messagecontainer"&gt;
      &lt;ul id="history"&gt;&lt;/ul&gt;
  
      &lt;id id="chatscreen"&gt;
        &lt;ul id="messages"&gt;
          &lt;li&gt;yolo&lt;/li&gt;
        &lt;/ul&gt;
        &lt;div id="messagebottom"&gt;
          &lt;input type="text" placeholder="Start met typen" size="28" height="auto"&gt; &lt;button type="submit"&gt;Send&lt;/button&gt;
        &lt;/div&gt;
      &lt;/id&gt;
    &lt;/div&gt;
  &lt;/main&gt;</code></pre>
  </div>
  </div>
  </p>