I'm wondering why the spec has defined Object.keys
instead of Object.prototype.keys
? it would surely be much better if the API was consistent, and I would like to understand why that is not the case.
Other methods are on Object.prototype
, so why is this not the case?