There is an easy way to fetch common or different elements from two arrays without comparison. You have no need to use loops to compare each element of one array from each and every element of another array.