As the question says,
I want to know that if there a way to change scope of a function like this,
function foo(){
var t = this;
log(t);//{bar:'baz'}
/*** Do something over here to change the scope ***/
var newThis = this;
log(newThis); //{something:'somethingelse'}
}
I am just curious to know, if there is a way.
Thanks