Javascript » DOM » Remove Node
👉 User Story:
As a user
Given a list of todo items
When clicking on an item
Then the item should be removed from the page
You can try things out directly on this pen:
https://codepen.io/marcopeg/pen/YzKJQEr
✅ Proposed Solution:
Don't run this unless you gave a very good effort to solve it yourself!
In this second solution we deal with dynamically generated items (basically an "add" button), it's interesting to note that event handlers must be explicitly set up for each new item...