<div id="root"></div>
function NumberList(props) {    
    const numbers = props.numbers;
  
    const listItems = numbers.map((number) => 
      <li key={number.toString()}>{number}</li>
    );
    
    return (<ul>{listItems}</ul>);
}

const numbers = [1, 2, 3, 4, 5];

ReactDOM.render(
  <NumberList numbers={numbers} />,
  document.getElementById("root")
);
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://unpkg.com/react/umd/react.development.js
  2. https://unpkg.com/react-dom/umd/react-dom.development.js