const arr = [1, 2, 3, 4];
const exists = arr.some(n => n > 5);
const allSmall = arr.every(n => n < 10);
console.log(exists || allSmall);
WebDEV #test #Frontend
Выберите правильный вариант 👇🏼
WE WebDEV @webb_dev · 8.3K subscribers const arr = [1, 2, 3, 4];
const exists = arr.some(n => n > 5);
const allSmall = arr.every(n => n < 10);
console.log(exists || allSmall);