how to check a class has added or not in javascript 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);