Given the following
var someObject = {};
someObject.prototype.a = function() {
};
someObject.prototype.b = function() {
//How can I call someObject.a in this function?
};
How can I call someObject.a from someObject.b? Thanks.
Given the following
var someObject = {};
someObject.prototype.a = function() {
};
someObject.prototype.b = function() {
//How can I call someObject.a in this function?
};
How can I call someObject.a from someObject.b? Thanks.
var someObject = {};
someObject.a = function() {
};
someObject.b = function() {
//How can I call someObject.a in this function?
this.a();
};
Thanks. I actually screwed up my original question. Functions a and b are on the someObject’s prototype. I’ve tried this.a and I’m getting an error.