function CrawlingAWebPageAndGetLinks(callback){ | |
// do the stuff the method pretend; | |
var value = Crawler.Get("https://www.google.com/search?q=callback%20hell"); | |
// then use | |
callback(value); | |
} | |
(function program(){ | |
var callback = function(v){ | |
console.log(v); | |
}; | |
var result = CrawlingAWebPageAndGetLinks(callback); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment