Skip to content

Instantly share code, notes, and snippets.

@cesarkohl
Created January 13, 2020 14:24
Show Gist options
  • Select an option

  • Save cesarkohl/694f30b85184540fb38d148947190d3a to your computer and use it in GitHub Desktop.

Select an option

Save cesarkohl/694f30b85184540fb38d148947190d3a to your computer and use it in GitHub Desktop.
var students = [
 {name: 'adam'},
 {name: 'brian'},
 {name: 'charles'}
];
var student = students.find (function (student) {
 return student.name === 'brian';
});
console.log (student); // {"name": "brian"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment