Verifique se existe uma classe JavaScript
const element = document.querySelector("#box");
element.classList.contains("active");
Xanthous Xenomorph
const element = document.querySelector("#box");
element.classList.contains("active");
const div = document.querySelector('.info');
div.classList.contains('secondary'); // trueCode language: JavaScript (javascript)