Roster box

Ava · Guard
Jordan · Forward
Mia · Guard
Noah · Center
Inspect the roster children.

Ready.

Important HTML

Only element children count — not text nodes between tags.

<div id="roster">
  <article>Ava · Guard</article>
  <article>Jordan · Forward</article>
  <article>Mia · Guard</article>
  <article>Noah · Center</article>
</div>

Important JavaScript

children is a live list of element children.

const roster = document.getElementById("roster");
const kids = roster.children;
console.log(kids.length);
console.log(kids[0].textContent);