📜  快速检查所有数组元素是否匹配闭包 - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:21.441000             🧑  作者: Mango

代码示例1
let names = ["Sofia", "Camilla", "Martina", "Mateo", "Nicolás"]
let allHaveAtLeastFive = names.allSatisfy({ $0.count >= 5 })
// allHaveAtLeastFive == true