Contact: aviboots(AT)netvision.net.il
39,880 questions
51,806 answers
573 users
let arr = [2, 4, 6, 8, 10, 12] let allEven = arr.allSatisfy({$0 % 2 == 0}) print(allEven) /* run: true */
let arr = ["swift", "java", "python", "rust"] let allBiggerLetters = arr.allSatisfy({$0.count > 3}) print(allBiggerLetters) /* run: true */
let arr = ["swift", "swift", "swift", "swift"] let allAreSwift = arr.allSatisfy({$0 == "swift"}) print(allAreSwift) /* run: true */