js foreach比for多出两个undefined

项目中发现,javascript 用foreach会比for多出两个undefined,

//会多两个undefined
 for (var i in _SysFunctions_S) {}

//正常
 $(_SysFunctions_S).each(function(index, i) {

});

查到一下资料

http://segmentfault.com/q/1010000000140735

原文地址:https://www.cnblogs.com/PLifeCopyDown/p/3605621.html