class list contains code example
Example 1: add multiple classList
element.classList.add(class1,class2,class3...);
Example 2: if classlist contains js
element.classList.contains(class);
Example 3: css class list
var myElement = document.getElementById("myElementID");
myElement.classList.add("style1 style2");
myElement.classList.remove("style1 style2");
Example 4: classList has class
if (document.body.classList.contains('thatClass')) {
}
Example 5: class list contains class java
List<Card> hand = ...;
for(Card card : hand){
if (card instanceof AceOfDiamonds) return true;
}