Variable "is Not Defined" Error, Why
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
mytest = MyObj.test.startTest
This gives you a function without context. If you call this function directly then this
is window
.
You want to all test.startTest()
so that this
is test
Post a Comment for "Variable "is Not Defined" Error, Why"