Use cases for Object.create(null)

Viewed 553

I understand that using Object.create(null) creates an object which has no proto property (i.e. Object.getPrototypeOf( myObj ) === null) but can someone help me understand what are some of the use cases for this?

In other words, why would you want to create an object that is completely empty (i.e. doesn't inherit any methods from Object.prototype)?

2 Answers
Related