I need to know how to make a function wait for a callback from another function before executing. Below is a simplified scenario of what I am trying to accomplish.
function a(){
b();
// Wait for function c to callback
var callback = function();
// then continue function a() logic...
}
function b(){
c();
return false;
}
function c(){
//trigger callback in function a
callback();
}