include all members of array code example
Example 1: javascript check if elements of one array are in another
const found = arr1.some(r=> arr2.includes(r))
Example 2: determine a value of an array element based on a condition in another array
cities
.filter(city => city.population < 3000000)
.sort((c1, c2) => c1.population - c2.population)
.map(city => console.log(city.name + ':' + city.population));