Lowest price ever! Learn Generative AI for 48% less!
Get my discount+ 1
use promise if possible.
or create a callback.
function foo(){
asyncfunction(paramX, callback);
}
function callback(result){
//the result goes here
}
function asyncfunction(x, callback){
//dosomething with x
callback(result);
}