Remember the Loading JSON from remote server example?
So I have this function
this.loadJsonFromRemote("url", this.UpdateWords);
which calls this function
Loader.prototype.UpdateWords = function(data) {
this.processString(data);
this.compareArrays();
this.generateText();
};
but when I launch the app, I get:
[Loader.js?id=7406746:88]: Uncaught ReferenceError: processString is not defined
but the function is defined in the same script!
Loader.prototype.processString = function (data) {
//some code
};
What am I missing here, please!
EDIT:
Resolved-
this.loadJsonFromRemote("url", this.UpdateWords.bind(this));