Your code might be perfectly correct (it might also be problematic, depending on how you call testConstr
).
My suggestion is: tell JSLint to shut up
Or don’t use JSLint at all.
More Related Contents:
- Why should you not use Number as a constructor? [duplicate]
- What does "use strict" do in JavaScript, and what is the reasoning behind it?
- Use of .apply() with ‘new’ operator. Is this possible?
- JavaScript inheritance and the constructor property
- Why avoid increment (“++”) and decrement (“–“) operators in JavaScript?
- What is the significance of the Javascript constructor property?
- How to initialize an array’s length in JavaScript?
- Using “Object.create” instead of “new”
- Understanding prototypal inheritance in JavaScript
- Immediate function invocation syntax
- (…()) vs. (…)() in javascript closures [duplicate]
- JavaScript function order: why does it matter?
- Setting methods through prototype object or in constructor, difference? [duplicate]
- Javascript “Not a Constructor” Exception while creating objects
- JSlint error ‘Don’t make functions within a loop.’ leads to question about Javascript itself
- Can I construct a JavaScript object without using the new keyword?
- JSlint: unexpected ‘for’ [duplicate]
- What does calling super() in a React constructor do?
- JSLint error: Move all ‘var’ declarations to the top of the function
- When is it appropriate to use a constructor in REACT?
- does javascript’s this object refer to newly created object in the way i think
- Don’t make functions within a loop [duplicate]
- JSLint “insecure ^” in regular expression
- JSLint Expected ‘===’ and instead saw ‘==’
- Function and Object Javascript
- OO Javascript constructor pattern: neo-classical vs prototypal
- Advantages of setting the “constructor” Property in the “prototype”
- JSLint: was used before it was defined
- JSLint: Using a function before it’s defined error
- JSLint: control comments (selective ignore)