JS数组方法some()和every()的区别

JS数组方法some()和every()的区别

共同点: 1.遍历数组; 2. 三个参数分别是item,index,arr(数组具体项,位置,数字本身); 3.返回的都是布尔值; 区别: 1.some()方法,遍历数组的每一项,若其中一项为 true,则返回true;
JavaScript120