Last active
June 9, 2022 11:03
-
-
Save glommer/6fca604bbf76e9b397419f3328368673 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const users : User[] = [ | |
{ name: "Glauber Costa", email: "glauber@nospam.me", age: 40 }, | |
{ name: "Glauber Costa", email: "glauberjr@nospam.me", age: 15 }, | |
{ name: "Alvin Wisoky", email: "alwinjr@wisoky.me", age: 21 }, | |
{ name: "Alvin Wisoky", email: "alwin@wisoky.me", age: 41 }, | |
] | |
const user = users.find(user => user.name == "Glauber Costa" && user.age >= 40); | |
return new Response(user?.email ?? "not found"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment