![Remove class from HTML element](https://javascriptsource.com/wp-content/uploads/2022/02/Remove-class-from-HTML-element-702x526.jpg)
Use Element.classList
and DOMTokenList.remove()
to remove the specified class from the element.
const removeClass = (el, className) => el.classList.remove(className);
// EXAMPLE
removeClass(document.querySelector('p.special'), 'special');
// The paragraph will not have the 'special' class anymore