Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript JavaScript and the DOM (Retiring) Responding to User Interaction The Event Object

tyler borg
tyler borg
9,429 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
231,236 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
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Jeffrey Holcomb
Full Stack JavaScript Techdegree Graduate 17,506 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.