Fix my code
Can someone fix my code (just create new code with my code) document.addEventListener("DOMContentLoaded", function() { const taskForm = document.getElementById("task-form"); const taskInput = document.getElementById("task-input"); const taskList = document.getElementById("task-list"); loadTasks(); taskForm.addEvent("submit", function(event) { event.preventDefault(); addTask(taskInput.value); taskInput.value = "" }); function addTask(taskText) { const taskItem = document.createElement("li"); taskItem.className = "task-item"; taskItem.textContent = taskText; const deleteBtn = document.createElement("button"); deleteBtn.textContent = "Delete"; deleteBtn.addEventListener("click", () => { taskList.removeChild(taskItem); saveTasks(); }); } function saveTasks() { const tasks = []; document.querySelectorAll(".task-item").forEach(item =