The Todo list expanded
Create aTodoList object with
- A
tasksarray property - A method
printTasksthat will, like the previous excercise, loop over theTodoList's tasks and print similarly. - An
addTaskmethod 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
completeTaskmethod that will take antask_indexas a parameter and will set the appropriate task to be done