Various JavaScript libraries (e.g. jQuery) offer an each
method:
$.each(myObj, myFunc);
What's the advantage over using the built-in for..in
loop:
for(var i in myObj) {
myFunc(i, myObj[i]);
}
In both cases I'd have to check for unwanted properties (usually functions), so I don't see why the each method is provided in the first place.