contains class in javacript code example Example: js contains class element.classList.contains('class');