Hello friends I have this code that works well for me to check if my element contains a certain class, but I want to achieve the opposite, that it checks me when this class does not contain the element.
if (document.querySelector(".header").classList.contains("no-sticky")) {
alert();
}