intersection

Create an array with unique values that are present in all arrays.
The order of the values is based on the first array.

Optionally, use a compare function for element comparison (default is ===).

Consider using the native Set.prototype.intersection() function instead.

Example