0
Free MOCK
Apply Internship
Blog
Learning
Roadmap
Others
Login
Beginner
JavaScript
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
Show Solution
Reset
Output
Run Code
Click 'Run Code' to see the output