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


Byron Farrell
Byron Farrell
5,700 Points

JavaScript callback functions


I come from a java/c background but I am still new to programming I only have around 2 years experience. I have started learning JavaScript but for the life of me I can't understand the how callback functions work and passing functions into functions and storing a function in a variable. I looked on MDN and other sites but most of them just given quick code examples without any real explanations?

Can anyone explain what all the jazz is about with JavaScript functions or know any good books or websites

Thanks in advance!

2 Answers

Sean T. Unwin
Sean T. Unwin
28,690 Points

This course should help you -- https://teamtreehouse.com/library/callback-functions-in-javascript

If you still have questions during or after be sure to ask. :-)

Emmanuel C
Emmanuel C
10,636 Points

Hey try this site out: Callback Function

I literally typed "JavaScript callback functions" into google and this was the first site that came up. And its not too bad. It the world of programming, search engines like google are your greatest ally.

Good luck