js remove classlist code example
Example 1: javascript clear classList
element.classList.remove(...element.classList);
Example 2: classList has class
if (document.body.classList.contains('thatClass')) {
// do some stuff
}
element.classList.remove(...element.classList);
if (document.body.classList.contains('thatClass')) {
// do some stuff
}