Skip to main content

Accepted Answer · #49 · 2026-05-23

Which answer is correct?

Difficulty 1/3

How to play

Read the Stack Overflow–style question, then pick the one correct answer from four plausible options. Watch out — wrong answers often have high fake votes.

What is the best way to remove duplicates from an array?

I have an array like `[1, 2, 2, 3, 3, 3]` and want `[1, 2, 3]`. What's the cleanest approach?

javascriptarraysduplicates

Loading your progress...

Press 1 through 4, or tap a numbered choice, to answer. Back to hub