In very rare instances where something may have been added to Object.prototype
Object.prototype.bar = 'bar';
It may be better to create an Object with Object.create(null)
as it won't inherit this, consider
({}).bar; // bar
// vs
Object.create(null).bar; // undefined
This means you don't have to worry for example if you've used a for..in
loop
Furthermore, you can make it so you fail instanceof
tests
Object.create(null) instanceof Object; // false
This is because instanceof
is basically testing the prototype chain against the RHS, and there is no such chain.