JS alterna várias classes

const toggleCSSclasses = (el, ...cls) => cls.map(cl => el.classList.toggle(cl))
Lioruby