javascript - Creating global 'for' variable. Should be 'for (var items ...' -


i using jshint. can tell me why it's treating "for" keyword global variable?

creating global 'for' variable. should 'for (var items ...'

here's loop:

//items , properties defined above... var items = null, properties = someobject;  //code here terminated ; "semicolon"  (items in properties) {     if (properties.hasownproperty(items)) {         //some code here...     } } 

it nothing for items within construct.

if go

for (items in properties) { 

and items not defined, items global variable. since jshint complaining, don't declare items in scope of construct, though let in example code.

if it's defined, suggest file bug report jshint :-)


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -