Callback Functions – Go Do This and Bring Me The Result, Batman!

This is a l little digression caused by stumbling across questions and answers on a search this morning 🙂

When I search for answers to various questions I have about code, one of the things I always stumble across is some question about “callback functions” like What Is A Callback Function on Stackoverflow. Or Understand JavaScript Callback Functions and Use Them. In both places, the answers are, IMHO, way too deep! The typical form of a function when you “call it” – execute it, is

function function_name(someInput1, someInput2, someInput3);

When one of the “someInputX” is a function that you can “call” – execute, somewhere else, that function is a “callback function” because it calls “back to” another function to get the data – result for the function_name to use.

Or, to get simple, simple with no techie confusing words, a callback function is some function that executes somewhere and brings the results back to another function.

Complex explanations of “callbacks” are like this boring piece to me 😉 …just an opinion because opinions are like bellybuttons; everyone has one but that doesn’t make everyone a belly dancer.