Skip to content

Commit 5bed5e6

Browse files
committed
done callbacks stretch
1 parent 86de91e commit 5bed5e6

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎assignments/callbacks.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,9 @@ function removeDuplicates(array, cb) {
6262
// removeDuplicates removes all duplicate values from the given array.
6363
// Pass the duplicate free array to the callback function.
6464
// Do not mutate the original array.
65+
cb(array.filter( (obj, i )=> array.indexOf(obj) ===i
66+
));
6567
}
68+
items.push(...items);
69+
console.log(items);
70+
removeDuplicates(items, logger);

0 commit comments

Comments
 (0)