The Todo list expanded
Create aTodoList
object with
- A
tasks
array property - A method
printTasks
that will, like the previous excercise, loop over theTodoList
's tasks and print similarly. - An
addTask
method that will add a given task to the list of tasks. - Use the object to add a task to the TodoList and then print the tasks
- Bonus: add a
completeTask
method that will take antask_index
as a parameter and will set the appropriate task to be done