What is the output of the following React functional component?
const ItemList = (props) => {
return (
<ul>
{props.items.map((item, index) => <li key={index}>{item}</li>)}
</ul>
);
};
<ItemList items={['Apple', 'Banana', 'Cherry']} />
Apple Banana Cherry
<ul><li>Apple</li><li>Banana</li><li>Cherry</li></ul>
Apple, Banana, Cherry
Error: map is not a function
This question is part of this quiz :
Functional Components