Why is not the variable i accessible in the last line? Or to be more precise, it takes the value of the last value of i in the iteration +1 (which actually makes sense). What I would like it to take is the same value that it takes in li\_hotel[i] when registering with the event.

```
for (var i = 0; i < li_hotel.length; i++) {
    li_hotel[i].addEventListener('click', function(event) {
        document.querySelector('#content > .left').innerHTML = this.innerHTML;
        document.querySelector('#content > .right').innerHTML = i;
    })
};

```

Thank you.