What is the proper way to call another function from a function within the same object that will pass jslint?
Any information would be greatly appreciated!
Simple example for illustration purposes:
(function () {
"use strict";
var myObject = {
functionOne: function () {
console.log("functionOne called by functionTwo");
},
functionTwo: function () {
// jslint Error: 'myObject' is out of scope. (out_of_scope_a);
// What is the proper way to call another function inside the same Object that will pass jslint?
myObject.functionOne();
// jslint Error: Unexpected 'this'. (unexpected_a);
// What is the proper way to call another function inside the same Object that will pass jslint?
this.functionOne();
}
};
myObject.functionTwo();
}());