数组find方法
    Array.prototype.find()方法是 JavaScript 提供的一种循环数组元素的方法,它可以用于查满足给定条件的第一个元素,并返回其值。该函数可以接受两个参数:数组中要检索的元素以及一个回调函数,该回调函数可以用来确定数组项是否符合给定的条件。如果满足条件,find 方法会返回该元素,如果不满足,则返回 undefined。
    Array.prototype.find()方法非常实用,可以帮助开发者简化代码,并帮助他们在数组中更有效地查特定元素。它也可以像 for 循环一样实现特定功能,而不必使用额外的循环结构。函数prototype
    举个例子来说,让我们说我们想出字符串数组中最长的元素。使用 find 方法,我们可以编写出如下代码:
    const words =  ["its","really","rather","beautiful","day"];
const longestWord = words.find(word => word.length === Math.max(…words.map(word => word.length)));
console.log(longestWord); // Output: "beautiful"
    在此例子中,find 方法将返回具有最大字符串长度的“beautiful”。
    总而言之,Array.prototype.find() 方法是开发人员中常用的一种数组处理方法,它由浏览器原生实现,提供简洁易读的代码,同时可以有效地查数组中的特定元素。