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.
1.4m articles
1.4m replys
5 comments
57.0k users