Rendering Arrays
Rendering Arrays
Rendering an array means turning each item into visible DOM. The array is the source of truth, but the user sees elements.
A common mistake is producing an array of strings and never inserting anything into the document. For DOM work, the contract is the page state, not the intermediate value.
Your task: Render each topic in the topics array as an li inside the topic list. The list starts empty and should contain one item per topic.
Free with a JS Exercises account
Sign in to start coding, run your solution, and keep your progress saved for later. No payment needed.
By continuing, you agree to our Terms and Privacy Policy. We'll send occasional product updates and news. You can unsubscribe anytime.
Rendering Arrays
Rendering an array means turning each item into visible DOM. The array is the source of truth, but the user sees elements.
A common mistake is producing an array of strings and never inserting anything into the document. For DOM work, the contract is the page state, not the intermediate value.
Your task: Render each topic in the topics array as an li inside the topic list. The list starts empty and should contain one item per topic.