element.classList.contains(class); code example
Example 1: classList has class
if (document.body.classList.contains('thatClass')) {
// do some stuff
}
Example 2: class list contains class java
List<Card> hand = ...;
for(Card card : hand){
if (card instanceof AceOfDiamonds) return true;
}