.find() method returns the first element in the array that satisfies the given function.
function is a callback that is applied to each element as the
array is traversed. If no valid element is found,
undefined is returned.
Finding the first temperature that’s over 90°:
const temperature = [72, 87, 92, 90, 85, 88, 81];const hot = temperature.find((element) => element >= 90);console.log(hot);// Output: 92
The following example finds the first person under 21 years old in the