Looking at all the information out there on JSlint (eg. here or here), the discussion goes something like this Always use strict mode since it catches many more errors. All you have to do is put ‘use strict’ at the top of your code. That’s it! Couldn’t be easier… Except when JSlint complains and tells you to put it in
Tag: jshint
If a strict mode function is executed using function invocation, its ‘this’ value will be undefined
I’m getting the following warning when using jshint. Why? If a strict mode function is executed using function invocation, its ‘this’ value will be undefined. Answer Rather than try to suppress the warning, it’s better to address the root cause. Use of this can be confusing, and the value of this can unexpectedly change when refactoring code. Your code will
Pass event to another function
Now with above code I am getting JShint error: “Dont make functions within loop”. To resolve above error I am doing this now: Is this fine? If yes then how can I pass event from click event to clickHandler and then to doClick function? Answer No, it’s not fine. The problem in creating functions inside a loop is that you