1import React from 'react';
2
3const people = [
4 {
5 name: 'James',
6 age: 31,
7 },
8 {
9 name: 'John',
10 age: 45,
11 },
12 {
13 name: 'Paul',
14 age: 65,
15 },
16 {
17 name: 'Ringo',
18 age: 49,
19 },
20 {
21 name: 'George',
22 age: 34,
23 }
24];
25
26function App() {
27 return (
28 <div>
29 {people.filter(person => person.age < 60).map(filteredPerson => (
30 <li>
31 {filteredPerson.name}
32 </li>
33 ))}
34 </div>
35 );
36}
37
38export default App;