I am having a JavaScript namespace say
A={
  CA: function() {
    this.B();
  },
  B: function() {
    var test='test';
    var result='t1';
    C: function() {
      this.test='test1';
      .....
      .....
      return 'test1';    
    }
   result=this.C();  
   return result; 
  }
}
Now when I am executing such code it is giving that TypeError: this.C is not a function. Can somebody tell me why it is so. I know it is something related with lexical scoping but am unable to understand this.