how to sense if a class belongs to an element code example
Example 1: js check for class in classList
element.classList.contains(className);
Example 2: if classlist contains js
element.classList.contains(class);
element.classList.contains(className);
element.classList.contains(class);