Build a React component that renders a list of items from a hardcoded array.
EasyProblem Statement
Build a React component that renders a list of items from a hardcoded array.
Sample Input
items = ['Apple', 'Banana', 'Cherry']
Sample Output
Apple Banana Cherry
Limits
Time: 2s · Memory: 256 MB
Code Editor
Log in to submit00:00
Try your code in this preview. Submit marks it done.
import React from "react"; const ItemList = () => { const items = ['Apple', 'Banana', 'Cherry']; return ( // Map over items and render them inside <li> tags ); }; export default ItemList;