01 / 03
One button per row
Once something is finished you want it gone. The button that does that goes on each row, one each.
You build it exactly the way you built the li — make a button, then attach it inside the li. Each row ends up carrying its own.
const done = document.createElement("button")done.textContent = "Done"item.appendChild(done)