Hi I've consulted: https://stackoverflow.com/a/9652434/3109607 but still have trouble with callbacks. I've also checked JS is sexy, callbackhell-dotcom, CW Beuchler's blog, the Maxogen repo on Github, and others on this topic.
Mr. Beuchler was kind enough to respond to my question but without him pointing it out I can't identify which function "thingToRun" is in the gist linked below. I'd like to include the code here but I had trouble so I had to use the gist.
In most functions this is written as "callback" so he was writing to illustrate that it doesn't have to be, but I still can't identify which function is being passed into getData. When I eliminate Mr. Beuchler's comments and try to find it on my own I have trouble. To me, it looks like logData (I'm just basing that on the arguments each function receives) but that's a regular function. Or maybe I misunderstand functions.
I need the info to write a simple app that gets a user's latitude / longitude, checks google's API to get the user's city name based on the lat / long, then checks the Dark Sky API to get your local weather based on the lat / long. So after this I have to figure out how to get multiple callbacks to play together.
Link to Gist of Mr. Beuchler's (helpful but I still don't get it) response to me: https://gist.github.com/theednaffattack/25d24d620cc35b160c17a95756fd1927