This is my issue:
var greatapp = {
start : function(){
$.AJAX({
url : 'foo.com',
success : function(data){
greatapp.say(data);
}
})
},
say : function(s){
console.log(s);
}
}
What i don't like about this example is the fact that i repeat my self in the success
function by defining the object's name instead of just this
which obviously won't work because it's in an external function.
How to only have the name greatapp
one time in a JS object?