I am having trouble with the edit function in my code. Despite defining it, I keep getting an error message that says "Uncaught TypeError: edit is not a function". I have tried different methods to fix this issue but nothing seems to work.
While the add and delete functionalities are working fine, I am unable to edit the list of items. Can someone please help me find a solution?
For reference, you can view my code on JSFiddle.
This is a snippet of my JavaScript code:
const todoInput = document.querySelector(".todo-input");
const todoButton = document.querySelector(".todo-button");
const todoList = document.querySelector(".todo-list");
const filterOption = document.querySelector(".filter-todo");
//Event Listeners
document.addEventListener("DOMContentLoaded", getTodos);
todoButton.addEventListener("click", addTodo);
todoList.addEventListener("click", deleteTodo);
filterOption.addEventListener("click", filterTodo);
//Rest of the JavaScript functions...