Skip to content

Instantly share code, notes, and snippets.

@oinant
Created August 1, 2015 13:35
Embed
What would you like to do?
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