A function is not working in javaScript

I am learning javaScript and developing a todoList app. I have put everything in an object called todoList,then at very first there's an array of objects that stores tasks in todoList. Every object has two properties i.e (todo=text, status=boolean). After that is a function called

showTasks

to display tasks in todoList. There is an if statement in

showTasks

function to check if the todoList is empty or not. After that is a for loop to display all the tasks in the array. Another if statement comes after the for loop to display the status of the tasks. The

addTask

function is for adding new tasks in the list that adds only the text for the task without the status (status is false by default). The

editTask

and

deleteTask

functions are pretty self explanatory. The last function called toggleStatus is to switch the status of a task and it is not working and i can't figure out why.