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 trialEllis Corio
22,035 Pointsthis should work...
why is this not accepted as a correct answer??
$('.student-list').on('click', (e)=>{});
when this is accepted as correct!!!
$('.student-list').on('click', function(event){ });
found this to be extremely annoying as it is correct and i wasted a lot of time trying to figure out why it was incorrect..................when it wasn't.
all I am doing is attempting to put what i have learnt into practice..... i.e. using e instead of using event.... and using an arrow function instead of the old fashioned way.....
1 Answer
Steven Parker
231,261 PointsThe arrow function is OK, but the challenge is expecting the parameter name to be "event". This becomes more clear once you see the instructions for task 2.
If you still feel this is a bug, you can report it to the Support staff.
Ellis Corio
22,035 PointsEllis Corio
22,035 PointsI dont feel that it is a bug................however in the very same video Treasure explains how some devs use (event), some use (evt) but most abbreviate it to (e).......................i feel that any of those should be accepted as a correct answser. because at the end of the day the achieve the goal right?
Ellis Corio
22,035 PointsEllis Corio
22,035 Pointsi think the test should be a little less rigid, and not fail people for such minor trivial differences.
Steven Parker
231,261 PointsSteven Parker
231,261 PointsYou can also make suggestions like that to [Support].
Perhaps a more expedient fix might be a bit of re-wording.
For example, instead of "Be sure to pass in the
event
object to the callback function." it could say something like "Your callback function should have anevent
parameter."