Answers for "find common elements in two flutter"

0

find common elements in two flutter

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);
}
Posted by: Guest on June-02-2020

Code answers related to "find common elements in two flutter"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language