Engrain by ByteRush

WEB.02.01 Mid-level

Node types, traversal and collections

Comes up in: Web fundamentals, Coding

This concept is being written. It gets the full five steps — explanation, predict, interview angle, practice with tests, and review cards. Here is exactly what it will cover, so you can study it elsewhere in the meantime.

What it covers

  • Node vs Element
  • childNodes vs children
  • live HTMLCollection vs static NodeList from querySelectorAll
  • TreeWalker
  • closest, matches, contains

Words you will know

node typelive collectionstatic NodeList

What you will practise

  • loop-over-live-collection bug

Interview questions this answers

  • What is the difference between children and childNodes?
  • What is the difference between a live HTMLCollection and a static NodeList?