I\'m tackling a project that requires me to use JavaScript with an API method call. I\'m a Java programmer who has never done web development before so I\'m having some trou
Also you may try recursion solution.
function asyncCall(cb) { // Some async operation } function responseHandler(result) { if (result.error()) { console.error(result.error()); } else if(result.data() && result.data().length) { asyncCall(responseHandler); } } asyncCall(responseHandler);