JS DOM API classlist check if includes 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);