摘要:
直接上代码: const arr = ['a','b','c'] const item = 'a' 我们想判断item在数组中是否存在,一般情况大家会这么写: if(arr.indexOf(item) > -1){ console.log('找到item'); } 这样写后面的 >-1 看着感觉有点 阅读全文
posted @ 2022-09-30 10:04
拨云丶
阅读(1924)
评论(0)
推荐(0)
摘要:
例如fileDate = [ {deleteValue: 0, downloadValue: 0}, {deleteValue: 1, downloadValue: 1}, {deleteValue: 2, downloadValue: 0}, ] 数组中的多个对象存在共同的属性deleteValu 阅读全文
posted @ 2022-09-30 09:46
拨云丶
阅读(205)
评论(0)
推荐(0)