I have the following code:
exported.removeWatcher(issueId, user, function(err, result) {
if (result.statusCode != 204) { // Build a list of failed issues
} else if (result.statusCode == 204) {
}
console.log();
});
I know that using callbacks is one of the strengths of node.js, but for my use-case, I want to wait until i recieve a response from the above callback (i.e not execute the code further unless the callback is fired.) How can i achieve this?