JavaScript JavaScript and the DOM Responding to User Interaction The Event Object

tyler borg
tyler borg
9,421 Points

I have no idea what he's asking us to do in this video.

About 3:30 in he asks us to 'fix' the handlers to get the desired behavior...what the hell is he asking us to do??

4 Answers

Steven Parker
Steven Parker
207,988 Points

Since the handler is attached to a container element, it will be triggered on an event that occurs on any element inside or on the list itself. He's asking that the handler action be limited to only working on list item elements.

If you continue on to about 4:00 in the video you will see an example solution with further explanation.

I agree, very confusing...

Jeffrey Holcomb
Jeffrey Holcomb
Full Stack JavaScript Techdegree Student 9,862 Points

The code within the event handlers is from the previous solution of using a for loop with the index variable of 'i'. The new solution does not use a for loop however, so we are to 'fix' the code to work without the for loop.

I have no idea what is going on anymore.