NodeList
// nodeList๋ ์ดํฐ๋ฌ๋ธ ๊ฐ์ฒด
const el = document.querySelectorAll("category");
const index = el.item(0); // [0] ์ธ๋ฑ์ค ์๋ฆฌ๋จผํธ๋ฅผ ๋ฐํ
const keep = el.forEach(el => console.log(el.textContext)); // category์ธ ๋
ธ๋๋ฆฌ์คํธ๋ฅผ ์ฝ์์ ์ฐ์
Last updated