Created
May 10, 2017 18:02
-
-
Save andrewjmead/0522570b9f7279cea72ea78dc167bd06 to your computer and use it in GitHub Desktop.
Example of array find method
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 = [{ | |
name: 'Andrew', | |
age: 26 | |
}, { | |
name: 'Jen', | |
age: 28 | |
}]; | |
const foundUser = users.find((user) => user.name === 'Andrew'); | |
console.log(foundUser); | |
// Will print out: | |
// { | |
// age: 26, | |
// name: "Andrew" | |
// } |
Awesome
Best Teacher!!!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Good Bro