forEach returns nothing, so no elements come back.
Acceptance criteria
- 1.The list should hold three items.
forEach returns nothing, so no elements come back.
function App() { const names = ["Ada", "Grace", "Alan"] return ( <ul> {names.forEach((label) => <li key={label}>{label}</li>)} </ul> ) } const root = ReactDOM.createRoot(document.getElementById("root")) root.render(<App />)
Output ready when you are
Press Run to render your code, or Submit to validate your solution.