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
Just to clarify, you don’t want to copy and paste that code. You want to copy and cut that code from the lower section, and paste it into the function you just created, addOrUpdateTask.
The purpose of building this function, addOrUpdateTask is replacing the previously written code so it being both places makes it susceptible to errors and other erratic behaviors.