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 trialAnnika Noren
26,930 PointsJavaScript Foundations: anonymous functions - challenge task #2
I just can not figure out what is wrong with my code.
This is what I have:
16 var anonymousFunction = function(){ 17 }; 18 19 anonymousFunction(function(){ 20 window.didExecute = true; 21 });
The error says I am missing a parentheses at end of function.
Thoughts? Probably something so minor....
2 Answers
Ken Alger
Treehouse TeacherAnnika;
I found this task to be poorly worded. All you need to do is add ()
at the end of line 20 before the semi-colon. That allows the window.didExecute = true;
to execute.
Ken
Annika Noren
26,930 PointsThank you, Ken.
Yes, it was poorly worded and confusing! I was definitely overthinking it.
Thank you so much for your response!