Home
← All questions

Todo list | Frontend Machine Coding

EasyFree
Was this asked in an interview?

Frontend Machine Coding interview practice: Build a todo app with add, toggle complete, edit, delete, and filtering.

Problem

Build a classic todo list application.

Requirements

  • Add a todo; toggle complete; delete a todo.
  • (Bonus) Edit inline, filter by All / Active / Completed, show remaining count, persist to localStorage.

Hints / Approach

  • State: todos: [{ id, text, completed }] plus a filter value.
  • Derive the visible list from todos + filter at render time (don't store a separate filtered array).
  • Use stable ids (e.g. crypto.randomUUID()); keep updates immutable.