Created
April 13, 2021 11:38
-
-
Save shoaibmehedi7/35e628485ad762c09d8dd001ecedcc06 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 students = [ | |
{name: 'Shoaib', roll: 2}, | |
{name: 'Mehedi', roll: 10}, | |
{name: 'Alex', roll: 5} | |
]; | |
function search(student) { | |
return student.name=== "Mehedi"; | |
} | |
console.log(students.find(search)); | |
// { name: 'Mehedi', roll: 10 } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment