Function haveNoDuplicates

  • Compare all elements of arr1 and arr2 and ensure they have no duplicates

    Parameters

    • arr1: any[]
    • arr2: any[]
    • key: string

    Returns boolean

    true if there's duplicates, false otherwise