HTMLCollection vs NodeList

Define/Explain the HTMLCollection

HTMLCollections creates an array-like structure of DOM element nodes.

Define/Explain the NodeList

NodeList creates an array-like structure of node elements such as element nodes or text nodes.

Explain Differences and/or Similarities

While both are collections of nodes, generally NodeList can hold different kinds of nodes, while HTMLCollection generally holds only element nodes. Additionally, NodeList items need to be accessed by the index of the NodeList Item.

Summary of Documentation

HTMLCollections and NodeLists are pretty similar, but have slight differences which may be of use in certain situations.