Ed

Real sorting needs often involve multiple criteria. Let's sort users by status (active first), then by name alphabetically.

Your Task:

  • Sort users array with multiple criteria
  • Primary: isActive users first (true before false)
  • Secondary: Alphabetically by name
  • Don't mutate the original array (create a copy first)
TypeScript Solution
Loading...

Submit your code to see test results