StaffCoder
TypeScript
Vanilla TypeScriptTypeScript 7.0
6 modules · 24 challengesSign up
Modules6 modules · 24 challenges
Finish every challenge, or complete the star challenge, to complete the module.

Challenges

4 challenges

Group Bookings By Day

Sign up to unlock
—No data yeteasy
About this challenge

Reduce a bookings array into a map keyed by date, each entry holding its bookings sorted by start time and a count. Every day in the requested range is included — days with no bookings appear with an empty list — keys are returned in chronological order, and a booking outside the range is excluded.

Read the full problem
Solved in a browser IDE and graded by tests. Sign up to solve

Leaderboard Sorting

Sign up to unlock
—No data yeteasy
About this challenge

Sort leaderboard entries by score descending with a documented tiebreak (earlier finish time, then name) without mutating the input. Support an ascending toggle and return a position for each entry, sharing a position number across genuine ties. The order is stable across repeated calls.

Read the full problem
Solved in a browser IDE and graded by tests. Sign up to solve

Order Totals

Sign up to unlock
—No data yeteasy
About this challenge

Compute an order summary from an order-lines array using map, filter, and reduce: item count, subtotal, discount total, tax, and grand total, excluding cancelled lines from every figure. An empty order returns zeros — never NaN or null — and a line with zero quantity contributes nothing. The input array is never mutated.

Read the full problem
Solved in a browser IDE and graded by tests. Sign up to solve

Inventory Summary Panel

Sign up to unlock
—No data yeteasy
About this challenge

Transform a stock array into a summary (total value, low-stock count, out-of-stock list, top categories by value) and render each part into the panel. Values render formatted, every derived figure comes from the transform rather than the DOM, and re-running with new data replaces the rendered summary rather than appending.

Read the full problem
Solved in a browser IDE and graded by tests. Sign up to solve

We use cookies that are necessary to run Staffcoder, and optional analytics cookies to see which pages get used. Analytics stays off unless you accept. Read our Cookie Policy.