📜  过滤器 - 任何代码示例

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

代码示例1
let customers = [  { id: 0, name: 'paul' },  { id: 1, name: 'jeff' },  { id: 2, name: 'mary' }];let customer = customers.find(cust => cust.name === 'jeff');console.log(customer);--> { id: 1, name: 'jeff' }