Passing arguments to a JavaScript callback function

In JavaScript, callback functions are used to perform an action or operation after another operation has occurred. The mechanics of a callback rely on the fact that everything in JavaScript is a first class object. This fact allows you to pass functions as arguments to another function. The latter function can then invoke that function at a predetermined point in the program.

Mmmm… 10 minute butter chicken

Mmmm… 10 minute butter chicken, originally uploaded by seyDoggy. 4 tbsp butter 1 tbsp red curry powder/paste 1 cup plain yogurt 2 cups cubed chicken (pre cooked) 1 tbsp vanilla 1 – 2 tbsp sugar/honey/young coconut juice Combine in sauce…