Practice · 1 of 3
DTO Validators
CHALLENGE
Difficulty: intermediate+25 XP
Write isTaskDTO(v) — true only for objects with string id, non-empty string title, boolean done, and optional string due (absent or string). Write isTaskListDTO(v) — true only for arrays where every element passes isTaskDTO.
Press Submit to check your solution.
Back to lesson: Practice: Mini Build: Typed API Model