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