This question already has an answer here:
I need to access the variable things
that is inside the function.
var movie={};
var name = 'The Hangover';
imdb.getReq({ name: name }, function(err, things) {
movie = things;
}
});
console.log(movie); //returns an empty object {}
via melhirech
No comments:
Post a Comment