javascript 数组 find

find() 方法返回通过测试(函数内判断)的数组的第一个元素的值。

let arr = [1,2,3,4]
        console.log(arr.find(i => {return i>1}))
//2
原文地址:https://www.cnblogs.com/mengfangui/p/9204368.html