17 / 26
read the snippet · pick its Big-O
// Keeps the first occurrence of each email.function dedupeByEmail(users) {return users.filter((u, i) => users.findIndex((x) => x.email === u.email) === i);}
// Keeps the first occurrence of each email.function dedupeByEmail(users) {return users.filter((u, i) => users.findIndex((x) => x.email === u.email) === i);}