variable scope issue — line 1
var i is function-scoped, so every click handler shares the same
i — by the time a click happens, the loop has already finished.
1for (let i = 0; i < items.length; i++) {2 items[i].addEventListener("click", ...);3}