Write a JavaScript program that will return true if the provided predicate function returns false for all elements in a collection, false otherwise
- برمجة جافاسكربت java script
- برمجة
- 2021-06-03
- ahmadghneem
الأجوبة
const none = (arr, fn = Boolean) => !arr.some(fn);
console.log(none([0, 1, 3, 0], x => x == 2));
console.log(none([0, 0, 0]));
أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال