var red = {a: 2};
red.fn = function(b){
    console.log("A: "+a ", B : "+b);
}
red.fn(20);
this gives error:
ais not defined
But i suspect a is already available as a global object to the function fn then why is it not accessible.
Any explanation would be helpful.
 
     
     
     
     
    