JavaScript Array Functions: .find()

August 04, 2020

const people = [
  { id: 1, name: 'Sabin' },
  { id: 2, name: 'Maddy' }
]


const me = people.find( person => person.id === 1 )

// { id: 1, name: 'Sabin' }