Skip to content

Instantly share code, notes, and snippets.

@codewithbernard
Created December 6, 2021 09:42
Show Gist options
  • Select an option

  • Save codewithbernard/a47b4e5f812979bdb58f3b343d02ad7e to your computer and use it in GitHub Desktop.

Select an option

Save codewithbernard/a47b4e5f812979bdb58f3b343d02ad7e to your computer and use it in GitHub Desktop.
const users = [
{ name: "John", age: 24 },
{ name: "Linda", age: 19 },
{ name: "Josh", age: 33 }
];
function App () {
return (
<div className="App">
{users
.filter((user) => user.age > 20)
.map((user) => (
<li>{user.name}</li>
))}
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment