The brief
you can't edit the code — only instruct the AIdedupe(list)
- Removes duplicate values from
list. - Keep each value's last occurrence, at the position it last appeared — not the first.
dedupe([1, 2, 1, 3]) → [2, 1, 3]
current code — written by the AI
function dedupe(list) {
// Remove duplicate values.
return [...new Set(list)];
}
6 hidden cases · 1 shown
Drive the AI
it does exactly what you sayDrive me to fix dedupe so it passes the hidden tests. I do exactly what you tell me — nothing more — so be precise. Every message costs tokens; fewest tokens wins. Par is 400. Hit “Run tests” whenever you want to check.
token spend vs par0 / 400