I have something like this:
var MyObject = function () { };
MyObject.prototype = {
methodA: function() {
methodB();
}
methodB: function() {
// do something
}
}
How do I get this working? i keep getting "Object has no method 'methodB'".
methodA:{}as well as athis.methodB();instead of justmethodB();methodA:{}.this.methodB();gives me an error in Chrome:Uncaught TypeError: Object #<Object> has no method 'methodB'