@@ -6,9 +6,9 @@ Dedupe Array
66
77In this kata, you will need to deduplicate the elements of an array
88
9- E.g. dedupe(['a','a','a','b','b','c']) target output: ['a','b','c']
10- E.g. dedupe([5, 1, 1, 2, 3, 2, 5, 8]) target output: [5, 1, 2, 3, 8]
11- E.g. dedupe([1, 2, 1]) target output: [1, 2]
9+ E.g. dedupe(['a','a','a','b','b','c']) returns ['a','b','c']
10+ E.g. dedupe([5, 1, 1, 2, 3, 2, 5, 8]) returns [5, 1, 2, 3, 8]
11+ E.g. dedupe([1, 2, 1]) returns [1, 2]
1212*/
1313
1414// Acceptance Criteria:
@@ -22,6 +22,7 @@ test.todo("given an empty array, it returns an empty array");
2222// When passed to the dedupe function
2323// Then it should return a copy of the original array
2424
25- // Given an array with strings or numbers
25+ // Given an array of strings or numbers
2626// When passed to the dedupe function
27- // Then it should remove the duplicate values, preserving the first occurence of each element
27+ // Then it should return a new array with duplicates removed while preserving the
28+ // first occurrence of each element from the original array.
0 commit comments