Finding what is common to two arrays February 1, 2023 by Tarik You can intersect the arrays using &: array1 & array2 This will return ["pig", "dog", "cat"].