Course · Section 14: Object-Oriented Programming (OOP) With JavaScript · Lecture 226: ES6 Classes
Model a todo list. Implement `TodoList`: - `add(text)` adds an undone todo. - `toggle(index)` flips the done state of a todo. - `remaining()` returns how many todos are not done.
+ 1 hidden test run on Submit.
Each todo carries a done flag; toggling flips it and remaining filters the undone ones.
Run your code to see results.