Deviopath › TypeScript

Count Finished Tasks

Easy · Enums

In a numeric enum the members get the values 0, 1, 2, ... in order. So in Status, Todo is 0, InProgress is 1 and Done is 2.

Write countDone(statuses: Status[]): number that returns how many tasks are Status.Done.

Next: Next Traffic Light