Last active
December 11, 2015 15:59
-
-
Save alexdelany/4624400 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Source(url){ | |
this.url = url; | |
this.morelinks = ['NO CHANGE']; | |
this.calculate = function(url){ | |
console.log("Calculating: " + this.url); | |
console.log('1: ' + this.morelinks) | |
var parse = function(err,resp,body){ | |
console.log('3: ' + this.morelinks) | |
this.morelinks.pop("ADDED ONE"); | |
} | |
request(this.url,parse); | |
console.log('4: ' + myResults.morelinks) | |
} | |
} |
forgot to include
myResults = new Source('http://www.reddit.com/r/videos');
myResults.calculate();
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
here's what the console prints
Calculating: http://www.reddit.com/r/videos
1: NO CHANGE
2: undefined
4: NO CHANGE
Express server listening on port 3000
3: undefined