Project 11: FAQ Accordion
JS Wizard
Builds on these lessons
Step 1 of 4
Project
Selecting an Element
Use document.querySelector('.faq-item') to grab the first matching element from the page and log it. Every DOM method starts the same way: get a reference to the element you want to work with.
🎯 Your Task
Please add the exact code shown in the light gray box below to your editor.Do not delete your previous code, just insert these new lines in the correct place!
const firstFaqItem = document.querySelector(".faq-item");
console.log(firstFaqItem);