Closed thefourtheye closed 9 years ago
Note that Dict "mangles" the keys that are added to the internal dictionary store, so there is no chance of a collision with Object.prototype or __proto__
. Object.create is unnecessary and limits backward-compatibility (though this is certainly not the longest pole in that tent).
We use
for..in
orif..in
more often in other functions, which will give us unexpected results with inherited properties from the prototype chain. So, its safer to useObject.create(null)