var response = yield doCall(urlToCall); // “yield” garuantees the callback finished. console. log(response) // The response will not be undefined anymore. By doing this, we wait until the callback function finishes, then get the value from it.
var response = yield doCall(urlToCall); // “yield” garuantees the callback finished. console. log(response) // The response will not be undefined anymore. By doing this, we wait until the callback function finishes, then get the value from it.