title: swap a class in pure JavaScript
body: <p>I want to swap a class, with one other, but with a loop. When you click if the brown square he move on the blue square, and the blue square is now on the position of brown square</p>
  
  <p>And many more he can move infinity. I hope you understand this problem, I post the begin of the code I have</p>
  
  <pre><code>var braken = document.querySelector(".board li.braken");
      var champagne = document.querySelector(".board li.champagne");
  
      braken.addEventListener("click", function () {
          braken.classList.remove("braken")
          braken.classList.add("champagne");
      })
      champagne.addEventListener("click", function () {
          champagne.classList.remove("champagne")
          champagne.classList.add("braken")
      })
  </code></pre>