The code is:
var func = function(){
this.a(){
//here 'this' refers to 'func'
};
var b = function(){
//here 'this' refers to 'window'
};
};
This is kind of beginner question, but are there any simple rules that I can follow to determine what context I'm currently in?
Thanks in adv.