JSHint is complaining at me because I'm looping over an object using for(o in ...), then using a o.somearray.forEach(function(){...}); inside. It's saying to not create functions within loops, but does it even matter in this case? It looks a bit nicer since there's less lines and it looks (slightly) better, but are there any major implications from it?
Is it any better to use a normal for-loop and iterate over the array like that, or is it fine to create a function and use the ECMA 5 version?
I'm doing something like this:
for(var i in data) {
data[i].arr.forEach(function(...) {
// do magic
});
}