Tuesday, July 2, 2019

javascript - How do I return the var in this function from request?

Is it possible for me to get the data from body.message to use outside that function?



I've tried this so far.



    var codetocheck;
request({
url: link,
json: true
},function (err, resp, body){
codetocheck = body.message;//var I want to use outside this function

})

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...