Need help with step 30 of TODO project

it was not me that asked the initial question but i am stuck on the same step: i am trying to use arrow syntax to create an addOrUpdate function, then move the dataArrIndex variable and the taskObj and if statement inside the addOrUpdateTask. help me get past this stage please

const addOrUpdateTask = () => {dataArrIndex, taskObj};

I created a new topic for you.

Remove what you have inside this arrow function here.

This should be your starting point

const addOrUpdateTask = () => {

};

the directions say to move the move the dataArrIndex variable, the taskObj object, and the if statement into the addOrUpdateTask function.

Look down further into the page and you should see this event listener taskForm.addEventListener("submit", (e) =>

Inside that callback for the event listener, you should see the dataArrIndex variable, the taskObj object, and the if statement.

Copy and paste that code, inside your addOrUpdateTask function to pass the tests

1 Like