1. Home
  2. Javascript
  3. Class list item
#javascript#class#list

This method lets you return a class name assigned to a given index value in the class list. Useful for looping through the 'classList' items. 'item' method belongs to the 'classList' property.

element.classList.item(0);
copy
Full Javascript cheatsheet
Sitemap Git repository