Sep 6, 2018 · 1 min read
Thanks! great explanation.
Jut one question related to twitter example:
T.get('search/tweets', params, function(err, data, response) {
if(!err){
// This is where the magic will happen
} else {
console.log(err);
}
})I do understand we’ve passed a callback function as third argument; in this callback function, we have passed three arguments, so questions are:
- How do we know we need to pass three arguments?
- How do we know first argument would be error…and so on?
- How T.get(), high-order function, will pass response to callback function…?