You need to move only taskData.forEach() with it’s content within it to the new function.
You have added whole taskForm event listener callback function within it.
I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.
You can see in the previouw before posting if the code is formatted properly, please pay attention.
I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.
the angular bracket at the beginning of each line means the code can’t be copy pasted for debugging, please be careful with which button you use.
But I can read it.
What’s the situation? What do the tests say? please describe
( Use arrow syntax to create an updateTaskContainer function. Then move the taskData.forEach() and its content from the taskForm 's submit event listener into the newly created function.)