Relative Content

Tag Archive for javascripthtmlarraysdomdom-events

How to make a delete button to delete an item, to which it belongs, from the list?

Sorry for my English.I have an array of items, that are being rendered on my web-page. Each item has a delete button, but how can I anchor a click on a button to the item, that it(button) belongs to? I mean: how can I delete exactly that item, which button I clicked? Do I need to add IDs to my items, if so, how can I do that?
Preferably without server or React, just JS
Looking forward for your help!