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