array includes element in another array code example
Example 1: check if array values exists in another array
$result = !empty(array_intersect($people, $criminals));
Example 2: if array ontains any item of another array js
const found = arr1.some(r=> arr2.indexOf(r) >= 0)