Practice ยท 1 of 3
Task Store: Create
Write makeStore() returning an object with create(body, userId) โ validates: title (string, 1-200 chars) and due (optional ISO-parseable date). Valid => { ok: true, task: { id: "t1", title, due: due ?? null, ownerId: userId, done: false } }; invalid => { ok: false, errors: [{field, message}...] } (collect all errors). IDs increment: t1, t2...
Difficulty: intermediate
Press Submit to check your solution.
Back to lesson: Practice: In-Memory CRUD โ Practice