📌  相关文章
📜  在两个 Flutter 中查找共同元素 - TypeScript 代码示例

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

代码示例1
void main() {
  List l1 = [1, 2, 3, 55, 7, 99, 21];
  List l2 = [1, 4, 7, 65, 99, 20, 21];
  List l3 = [0, 2, 6, 7, 21, 99, 26];

  l1.removeWhere((item) => !l2.contains(item));
  l1.removeWhere((item) => !l3.contains(item));

  print(l1);
}