To Do Lab (OOP Refactor)
Objective: Refactor your existing To Do App to use constructor functions. Feel free to reference the existing To Do App solutions to get started.
Requirements
- All todos should be created with a constructor function
- The constructor should accept
titleanddescription
- The constructor should accept
- The
ToDoconstructor should have a propertyallallshould be an array oftoDo's- Hint:
allshould be set directly on theToDoconstructor, NOT on new instances ofToDo
- The
ToDoprototype should have asavemethod that adds thetoDotoToDo.all - The
Todoprototype should have arenderfunctionrendershould use underscore templates- Calling render should append the
toDoto the page
- Submit the link to your To Do app repo in the homework submission form
- Read about Inheritance and the Prototype Chain to prepare for tomorrow morning's module and How to Start a Project to prepare for Project 0