1const element = document.querySelector("#box");
2
3element.classList.contains("active");
1
2
3
4
5 const div = document.querySelector('.info');
6div.classList.contains('secondary'); // trueCode language: JavaScript (javascript)