You can add an item and remove it. It has a confirmation before you remove it.
The problem comes when you say you don’t want to remove the item and then when you remove another item it removes the two items (the one confirmed to remove and the one that previously you said to not remove).
When I ran it, the console said that sTO was not defined, and it looks like it is though. I tried a few different ways, but I kept getting the same result as you.
I did have some luck having .appendChild in the else statement, but that moved it to the bottom of the list
I can’t see anything else that may solve this problem, sorry that I wasn’t really able to help
Once again, I may have found something that might help when searching for my own problems , Starting at " Create API controllers Get, Add, Update and Delete Todos" on down may help you with your problem.