How to make a function wait until a callback has been called using node.js
The “good node.js /event driven” way of doing this is to not wait. Like almost everything else when working with event driven systems like node, your function should accept a callback parameter that will be invoked when then computation is complete. The caller should not wait for the value to be “returned” in the normal … Read more