If I have the following code:
Meteor.call('/firstURL/abcd', xxx, function(err, result) {
if (err) {
//...
} else {
Meteor.call('/secondURL/acde', zzz, function(err, result) {
if (err) {
//..
} else {
valueneeded=result
}
});
}
});
console.log(valueneeded) //undefined
How to get variable
valueneeded
outside the asynchrnous call ?