I\'m interacting with a third-party JavaScript library where some function calls are asynchronous. Instead of working the asynchronous logic into my application, I preferred
How about calling a function from within your callback instead of returning a value in sync_call()?
function sync_call(input) { var value; // Assume the async call always succeed async_call(input, function(result) { value = result; use_value(value); } ); }