I have defined a object in a js file:
myobj.js
MyObj={
  
  test: {
     value: {a: 10, b: 7},
     startTest: function(){
         var x = this.value.a;
         var y = this.value.b;
         return {x: x, y: y};
     }
  }
}
In another js file I call this object function:
other.js
mytest = MyObj.test.startTest //assign starTest function to mytest
var a = mytest().x;
var b = mytest().y;
my index.html:
<body>
 <script src="myobj.js"></script>
 <script src="other.js"></script>
</body>
I got the error from Firebug in myobj.js:
"
this.value" is not defined in the line "this.value.a;"
Why?
 
     
    