if (myElement.classList.contains('someClassname')) { // do something }
element.classList.contains('class');