• Parameters

    • array: number[]

      an array of integers

    Returns number[]

    set of unique integers

    Description

    Given a list of any type, return a copy of the array with all duplicates removed. This only works with arrays with primitives, arrays with objects or arrays will not work.

    Example

    [1,2,3,2,1] will result in [1,2,3]