Join the AI Workshop to learn more about AI and how it can be applied to web development. Next cohort February 1st, 2026
The AI-first Web Development BOOTCAMP cohort starts February 24th, 2026. 10 weeks of intensive training and hands-on projects.
Use the contains method provided by the classList object, which is:
element.classList.contains('myclass')
Technically, classList is an object that satisfies the DOMTokenList interface, which means it implements its methods and properties.
You can see its details on the DOMTokenList MDN page.