-
Notifications
You must be signed in to change notification settings - Fork 3
Yasser Moradi edited this page Sep 1, 2015
·
1 revision
Description:
This method returns true if all elements in a sequence pass the predicate.
Sample:
let numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 15, 19];
let areAllNumbersAreUnder20 = numbers.asEnumerable().all(n => n < 20);
let areAllNumbersAreUnder10 = numbers.asEnumerable().all(n => n < 10);
console.log(all numbers are under 20 => ' + areAllNumbersAreUnder20 );
console.log(all numbers are under 10 => ' + areAllNumbersAreUnder10 );