I have a list looking like this. Can I somehow remove just 1 of the li elements with eventlistener and without changing the HTML? I can remove them all by this JS code here under, but I want to remove them in the order I click.
document.querySelector("ol").addEventListener('click', whenClick);
// function to remove rows
function whenClick(event) {
const li = document.querySelector('.item');
li.remove();
}
<ol>
<li class="item">Första</li>
<li class="item">Andra</li>
<li class="item">Tredje</li>
<li class="item" id="fifth">Femte</li>
<li class="item">Sjätte</li>
</ol>