about | help | code help+videos | done | prefs |
removeDuplicates
Given an array of integers, return a new array containing the same integers. However, if a value appears more than once in an array, the new array should contain only the first occurrence of that value. removeDuplicates([3, 4, 1, 3, 5]) → [3, 4, 1, 5] removeDuplicates([1, 1, 2, 1, 2, 2, 1, 2]) → [1, 2] removeDuplicates([5, 6]) → [5, 6] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 300
Copyright Nick Parlante 2017 - privacy