Learn localStorage by Building a Todo App - Step 12

i cannot work through this plz help me

const taskForm = document.getElementById("task-form");

const confirmCloseDialog = document.getElementById("confirm-close-dialog");

const openTaskFormBtn = document.getElementById("open-task-form-btn");

const closeTaskFormBtn = document.getElementById("close-task-form-btn");

const addOrUpdateTaskBtn = document.getElementById("add-or-update-task-btn");

const cancelBtn = document.getElementById("cancel-btn");

const discardBtn = document.getElementById("discard-btn");

const tasksContainer = document.getElementById("tasks-container");

const titleInput = document.getElementById("title-input");

const dateInput = document.getElementById("date-input");

const descriptionInput = document.getElementById("description-input");

const taskData = [];

let currentTask = {};

openTaskFormBtn.addEventListener("click", () =>

taskForm.classList.toggle("hidden")

);

closeTaskFormBtn.addEventListener("click", () => {

confirmCloseDialog.showModal();

});

cancelBtn.addEventListener("click", () => confirmCloseDialog.close());

discardBtn.addEventListener("click", () => {

confirmCloseDialog.close();

taskForm.classList.toggle("hidden");

});

taskForm.addEventListener("submit", (e) => {

e.preventDefault();

const dataArrIndex = taskData.findIndex((item) => item.id === currentTask.id);

const taskObj = {

id : `${titleInput.value.toLowerCase().split(' ').join('-')}`,

}

}); ```

Welcome to the forum @wintunkyawwtk7

Please remove the space before the colon.

Happy coding

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.