JSH318910: Use filter in for in loops

This option requires all for in loops to filter object's items. The for in statement allows for looping through the names of all of the properties of an object including those inherited throught the prototype chain. This behavior can lead to unexpected items in your object so it is generally safer to always filter inherited properties out  (JSHint option 'forin')

TypeName: UseFilterInForInLoops
CheckId: JSH318910
Severity: Warning
Type: JavaScriptFile
Links

comments powered by Disqus