Skip to content

Instantly share code, notes, and snippets.

@oinant
Created August 1, 2015 13:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oinant/da4367640c19afb8b64f to your computer and use it in GitHub Desktop.
Save oinant/da4367640c19afb8b64f to your computer and use it in GitHub Desktop.
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