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

Robert Clausen
Robert Clausen
12,336 Points

Call back help!

I just can not seem to wrap my head around proper implementation of callbacks. In this situation I am finding physical drives attached to the system. Displaying them on a webpage. Users select which drives they want to update. That array of objects is sent to the server, via AJAX. from that array of objecst I get the MODEL value of each drive and determine if there is firmware for the drives. In order to determine which firmware goes to each drive I need to read portions of each file in a directory and determine it applies to a model number. Once I find a match I need to determine if that firmware file's firmware value is an actual firmware upgrade. If it is, I will store somehow, tbd, if it is not, I will notify the user there is NOT a firmware file for that drive. Once that has been unwound, executing firmware update providing a means to update all the drives to their max available firmware. It seems reading the files I need a callback and the process that first must determine which files apply to a particular model has a callback that eventually returns to the usre. So...Help me understand callback? I have looked and looked trying to get this.