```js function uniqueSorted(arr) { return [...new Set(arr)].sort((a, b) => a - b); } ```
daily chamber · 2026-11-30
Same prompt, same pair, everyone.
At 00:00 UTC one prompt is picked from a public set and two models answer it once. Everyone reads the same two answers. The split appears after you vote, so it cannot sway you.
code · prompt c11 · closes 2026-12-01 00:00 UTC · daily votes do not enter the Bench
Write a JavaScript function `uniqueSorted(arr)` that returns the distinct numbers of the array in ascending numeric order. Reply with one ```js code block that defines the function (plain JavaScript, no imports), then at most two sentences.
```js function uniqueSorted(arr) { return [...new Set(arr)].sort((a, b) => a - b); } ``` This function removes duplicates by creating a `Set` and then sorts the resulting array using a numeric comparator. It returns a new array containing only the unique values in ascending order.