Course · Section 11: Working With Arrays · Lecture 149: Simple Array Methods
Implement `unique(arr)` returning the array with duplicates removed, keeping the first occurrence order.
+ 1 hidden test run on Submit.
new Set keeps first occurrences in order; spreading gives a deduplicated array.
Run your code to see results.