Gets a new array that will be the intersection of two arrays.

This function is valid in v2.1.0 to v2.24.2. This function has been downloaded 40 times.


{Array} array1
First array to be intersected with the second array.
{Array} array2
Second array to be intersected with the first array.


An array with all of the values that array1 and array2 share while each value only appears as many times as the minimum amount of times it is found in either array.

Required Function

This function directly requires the following function which is included automatically:

  • diffArrays()
    Creates a new array which is the difference of the two given arrays.