JS, um Wert in Array 2022 zu finden

const myArray = ["sun","moon","earth"];
const lookingFor = "earth"

console.log(myArray.find(planet => { return planet === lookingFor })
Famous Flamingo