how to return an object in an array javascript code example Example: return an object from an array javascript myArray.find(item => item.isAstronaut)