Edit in JSFiddle

function foo(){
    this.test = "hello scope";
    setTimeout( function(self){ self.bar(self); }, 1000, this );
}
foo.prototype.bar = function(self){
    alert( self.test );
}
var x = new foo();