Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

check if all array elements match closure swift

let names = ["Sofia", "Camilla", "Martina", "Mateo", "Nicolás"]
let allHaveAtLeastFive = names.allSatisfy({ $0.count >= 5 })
// allHaveAtLeastFive == true
Source by developer.apple.com #
 
PREVIOUS NEXT
Tagged: #check #array #elements #match #closure #swift
ADD COMMENT
Topic
Name
6+4 =