array element present in another javascript code example Example: if array ontains any item of another array js const found = arr1.some(r=> arr2.indexOf(r) >= 0)