jslint-error-explanations
jslint-error-explanations copied to clipboard
No article for this error: "W040 - Possible strict violation."
trafficstars
I have this error with JSLint: W040 - Possible strict violation.
But i couldn't find an article about this error on the website.
This error happened when you use the strict mode and you want to call a function (to have a private method for example).
For example:
function Foo() {
this.toto = 42;
bar.call(this);
}
function bar() {
console.log(this.toto);
}