编辑代码

//find方法为数组中每个元素都调用一次函数执行
//返回通过测试都数组都第一个元素的值
var arr = [1,2,3,4,5]
var res = arr.find((item)=>{
    return item>=3
})
console.log(res)