title: Vanilla JavaScript: Is there a way to toggle multiple CSS-classes in one statement?
body: <p>I use these JavaScript-code to change classes in my script: </p>
  
  <pre><code>var toggleDirection = function() {
    group.classList.toggle('left-to-right');
    group.classList.toggle('right-to-left');
  }
  </code></pre>
  
  <p>In my example there a only two classes to change but could be also multiple classes ... </p>
  
  <p>So therefore: Does anyone know a way to write the example less redundant?</p>