How To Find String In JavaScript Array With Find Method
const students = [
'Jake',
'Ray',
'Lisa',
'Isabella',
'Tom',
'Kevin',
'Armin'
]
console.log(students.find((student) => student === 'Jake')); // Returns 'Jake'
console.log(students.find((student) => student === 'Rob')); // Returns undefined
no comments