I\'m working on a plug-in for jQuery and I\'m getting this JSLint error:
Problem at line 80 character 45: Do not use \'new\' for side effects.
(new jQuery.faste
You are using new
to perform some action instead of to create an object and return it. JSLint considers this an invalid use of new
.
You should either use it like this:
var x = new SomeConstructor();
Or perform some action like this:
SomeMethod();
But never use new to perform an action like this:
new SomeCosntructor(args);
Doing so is considered using new
for side effects because you aren't using it to create an object.