问:Array.find()基本用法
七娃博客
302人阅读
find() 方法返回数组中满足提供的测试函数的第一个元素的值。否则返回 undefined。
const list = [1, 2, 3, 4, 5]; list.find((el) => el === 3); // 3 list.find((el) => el === 7); // undefined
主题开源不易,支持一下作者吧!
使用支付宝打赏
使用微信打赏
评论 | 0 条评论
登录之后才可留言,前往登录