Here is my code:
var A = (function(){
"use strict";
function FetchJSON(){
return someValue;
}
var Class = function(){
// how do I correctly call FetchJSON() from inside this class definition?
};
return {
Class: Class,
fetchJson: FetchJSON
};
})()
So basically I'm using JSLint to clean up my code and I'm just calling FetchJSON() from inside the Class object/function definition but JSLint is telling me I need to use the word 'new' before the FetchJSON() call and I'm thinking I don't. The code works with out the word 'new' just fine but JSLint is telling me it should have it. What's the deal?
Thanks