Skip to content

Instantly share code, notes, and snippets.

@aaronpowell
Created September 23, 2011 07:14
Show Gist options
  • Select an option

  • Save aaronpowell/1236887 to your computer and use it in GitHub Desktop.

Select an option

Save aaronpowell/1236887 to your computer and use it in GitHub Desktop.
Q11 - Spot the bug
var reader = {
setup: function() {
this.getData();
},
getData: function() {
$.ajax({
url: 'http://api.ihackernews.com/page?format=jsonp',
dataType: 'jsonp',
success: function(data) {
this.showData(data);
}
});
},
showData: function(data) {
//implementation unimportant
}
};
reader.setup();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment