HomeChallengesRepsProblemsLeaderboardTake a challenge

Search, Filter & Sort

The three operations behind every table you will ever build, and the traps in each.

Intermediate15 min on the clock6 graded checks · 100 pointsJavaScript + TypeScript
Graded by running your code against real cases.

What you build

  • searchUsers(list, term) across name and email
  • The search is case-insensitive and safe with an empty term
  • filterUsers(list, status) — "All" means no filtering
  • sortUsers(list, sortBy, direction) both ways
  • None of them may reorder the list they were given

Done means

Search, filter and sort all behave, and the caller's array comes back untouched.

How it is graded

Published in full, before you start — every point is one of these and there is nothing else. Each one runs your code; it is not a search for keywords.

  1. Search matches name and email+20Array methods
  2. Search ignores case+15Array methods
  3. An empty search returns everything+10Array methods
  4. filterUsers narrows by status, and "All" does not+15Array methods
  5. sortUsers orders both ways+25Array methods
  6. Sorting does not reorder the caller's array+15Not mutating your inputs

What it teaches

The rest of JavaScript + TypeScript