📜  .find angular 它是如何工作的 - TypeScript 代码示例

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

代码示例1
this.attr_0 = this.attr_1.find(x => x.id === someId);

// .find() works like a foreach loop here,
// it'll look inside of the this.attr_1 (array)
// and return on the condition (x.id === someId)