instance method Array#intersect

View source on GitHub →

Array#intersect(array) → Array
  • array (Array) – A collection of values.

Returns an array containing every item that is shared between the two given arrays.