JSHint considers a for-in variable 'bad'. What does this mean?-open source projects jshint/jshint
The following code:
var things = {'foo':'bar'}
for ( thing in things ) {
console.log(thing)
}
Consistently produces the following error in jshint:
Bad for in variable 'thing'.
I do not understand what makes the ‘thing’ variable ‘bad’ – as you can see, it is not being used anywhere else. What should I do differently to make jshint not consider this to be an error?