BeginnerJavaScript

Remove duplicates from an array

Write a function that removes duplicate elements from an array.

Examples

Input: [1, 2, 2, 3, 4, 4, 5]

Output: [1, 2, 3, 4, 5]

Your Solution

Output

Click 'Run Code' to see the output