1if(document.getElementById("myElmentID").classList.contains("hidden")){
2// I have the 'hidden' class
3}
1let span = document.querySelector("span");
2let classes = span.classList;
3let result = classes.contains("d");
4if (result) {
5 span.textContent = "The classList contains 'c'";
6} else {
7 span.textContent = "The classList does not contain 'c'";
8}