1. Home
  2. Javascript
  3. Class list item

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.

#javascript#class#list
element.classList.item(0);
copy
Full Javascript cheatsheet