jslint-error-explanations icon indicating copy to clipboard operation
jslint-error-explanations copied to clipboard

No article for this error: "W040 - Possible strict violation."

Open lludol opened this issue 9 years ago • 0 comments
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);
}

lludol avatar Jan 11 '16 11:01 lludol