September 2017
Intermediate to advanced
216 pages
6h 8m
English
The other approach is to use the isSuperset() method, which determines if the argument is a subset of the collection where we're calling the method:
const myList = List.of( List.of(1, 2, 3), List.of(4, 5, 6), List.of(7, 8, 9));const isSuperset = myList .flatten() .isSuperset(List.of(2, 5, 8));console.log('isSuperset', isSuperset);// -> isSuperset true
As you can see, this is just another way of getting the same result as the prior example.
Read now
Unlock full access