我正在使用 jshint。谁能告诉我为什么将“for”关键字视为全局变量?
创建全局“for”变量。应该是 'for (var items ...'
这是循环:
//items and properties are defined above...
var items = null, properties = someObject;
//code here is properly terminated with ; "semicolon"
for (items in properties) {
if (properties.hasOwnProperty(items)) {
//some code here...
}
}