Created
October 17, 2020 18:42
-
-
Save mbrown3321/af9beccacb283bbb850a6515b87c3ec2 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
let result1 = users.find(u => u.active); | |
// {id: 2, name: "Dwight Schrute", loginCount: 776655, active: true} | |
let result2 = users.find(u => u.id === 5); | |
// {id: 5, name: "Darryl Philbin", loginCount: 33, active: true} | |
let result3 = users.find(u => u.name.startsWith('Ryan')); | |
// {id: 4, name: "Ryan Howard", loginCount: 2, active: false} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment