Girl Develop It Buffalo

JS101 Class 3 Exercises: Objects

Home

The Todo list expanded

Create a TodoList object with
  1. A tasks array property
  2. A method printTasks that will, like the previous excercise, loop over the TodoList's tasks and print similarly.
  3. An addTask method that will add a given task to the list of tasks.
  4. Use the object to add a task to the TodoList and then print the tasks
  5. Bonus: add a completeTask method that will take an task_index as a parameter and will set the appropriate task to be done