Object-Oriented Programming · Karat · Medium
You are handed an existing TypeScript codebase that models obstacle-course timing with three classes: Course, Run, and RunCollection. A course is a sequence of obstacles, a run records the time taken on each obstacle, and a run may be incomplete (some obstacles have no recorded time). Over roughly 40 minutes of coding, you extend this codebase in three parts. Part 1 — Debug personalBest(). The method is meant to return the best total time among the runs in the collection. On…