There's also Array.find()
in ES6 which returns the first matching element it finds.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find
const myArray = [1, 2, 3]
const myElement = myArray.find((element) => element === 2)
console.log(myElement)
// => 2