• Returns whether the given array includes any of the given elements

    Type Parameters

    • E

    Parameters

    • Optionalarray: null | E[] | readonly E[]

      the array to check

    • Optionalelements: null | E[]

      the elements to compare

    Returns boolean

    whether the given array includes any of the given elements

    includesAny(['foo', 'bar'], ['foo', 'bar']);    // true
    includesAny(['foo', 'bar'], ['foo', 'world']); // true