Typically, the solution to for..in
's notorious caveat is something along the lines of:
for(var prop in obj) {
if(obj.hasOwnProperty(prop)) {
foo(); bar(); baz();
}
}
I feel like it would be cleaner to just do:
for(var prop in obj) {
if(!obj.hasOwnProperty(prop)) continue;
}
The question is... Are they not functionally identical?