Options
All
  • Public
  • Public/Protected
  • All
Menu

Module src/arrays/intersection

Index

Functions

Functions

Const intersection

  • intersection<T>(array1: T[], array2: T[]): any[]
  • Function to find the intersection between two arrays

    example

    intersection([1, 2, 3], [1], [1]); // return [1]

    example

    intersection([1, 2, 4, 7], [4, 6, 7]); // return [4, 7]

    Type parameters

    • T

    Parameters

    • array1: T[]
    • array2: T[]

    Returns any[]

    {T[]}

Generated using TypeDoc