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
Kenn Hyatt
9,683 PointsBindTaskEvent and passing two functions as arguments
At the bottom in the 'for' loops the method 'bindTaskEvent' is called and is passed to arguments. One is the list of completed or uncompleted tasks which is iterated through and I understand well enough. The second is a function, either 'taskCompleted' or 'taskIncomplete'.
Can someone point me toward some answers that will illustrate what specifically is happening between these functions?
For instance, What is the relationship between the functions? Are any variables or data passed between them? ie scope?
Is it really as simple as one function is called 'bindTaskEvent' and then another is called 'taskCompleted' or is something more going on here?