1function NameList() {
2 const names = ['Bruce', 'Clark', 'Diana']
3 return (
4 <div>
5 {names.map(name => <h2>{name}</h2>)}
6 </div>
7 )
8}
1[{
2 name: 'Sam',
3 email: 'somewhere@gmail.com'
4 },
5 {
6 name: 'Ash',
7 email: 'something@gmail.com'
8 }
9].map( ( {name, email} ) => {
10 return <p key={email}>{name} - {email}</p>
11})