Capstone: Interactive FAQ Page

Put it all together by building a fully interactive FAQ page with expandable answers, a live search filter, and a dark mode toggle.

Step 1 of 5

Step 1: Define your FAQ data

Every interactive page starts with data. Instead of hardcoding HTML for each FAQ item, we'll store our questions and answers in a JavaScript array of objects. This is exactly how real websites work — the data comes from a source (a database, an API, or a local array), and JavaScript turns it into HTML.

We'll use an array where each object has a `question` and `answer` property. Later, we'll loop through this array to create the page.

JAVASCRIPTREAD ONLY
CONSOLE
Click "Run" to execute your code...