How to call callback function in within callback function in node.js
callbacks are simply parameters in JS, just like others
just pass it to other functions
also notice that JS is lexical scoping
so make sure ur callback parameter in the scope or outer scope
--> What is lexical scope?
the call back function can be defined as any normal function.For example
the function someFunction can now be called as
This recipe can be found in it's original form on Stack Over Flow.