Deviopath › TypeScript

Book Reading Time

Easy · Interfaces

The Book interface has readonly properties, so they cannot be reassigned.

Write readingTime(book: Book, pagesPerDay: number): string that returns "<title> by <author>: <days> days", where days is pages / pagesPerDay rounded up. Use "day" (singular) when it takes exactly 1 day.

Next: Optional Properties