I've got the following (simplified) Batman.js
file:
(function(){
"use strict";
window.Batman = function(){
// Global references
this.version = "1.0.1";
};
Batman.prototype.saveGotham = function(params) {
var _ = this; // Works fine
destroyGotham.call(_, params);
};
// Private
function destroyGotham(params){
var _ = this; // <!-- "possible strict violation"
}
}());
JSHint complains about a possible strict violation
at the indicated line. How do I get around this without dropping the "use strict"
?
P.S: I'd like the troublesome var _ = this
to reference the Batman
instance.