Having trouble understanding why JSLint is surprised by my use of this
in the following code:
For both property assignments, JSLint says: Unexpected 'this'. How do I correct my code?
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.