Having trouble understanding why JSLint is surprised by my use of this in the following code:
this
function testConstr (x) { 'use strict'; this.joker = "Whyyy sooo seriousss?"; this.x = x; }
Your code might be perfectly correct (it might also be problematic, depending on how you call testConstr).
testConstr
My suggestion is: tell JSLint to shut up
Or don't use JSLint at all.
2.1m questions
2.1m answers
60 comments
57.0k users