判断arr数组里的元素是否存在{name:'张三'},
摘要:
const arr = [ {name: '李四', name: '王五', name: '张三'}, {name: '李四', name: '王五', name: '张三'}, ]; const hasZhangSan = arr.some(item => item.name '张三'); con 阅读全文
posted @ 2024-07-28 07:01 品味人生nuiapp 阅读(2) 评论(0) 推荐(0) 编辑