How do you return a value from a node js function?

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.

Sizin İçin Seçtik  Is AT&T going to all 5G?

Leave a Reply

Your email address will not be published. Required fields are marked *