// 不能写为Object.create(Object.prototype, {foo:hello}) var obj = Object.create(Object.prototype, { // foo会成为所创建对象的数据属性 foo: { writable: true, configurable: true, value: "hello", enumerable:true }, // bar会成为所创建对象的访问器属性 bar: { configurable: false, get: function() { return 10 }, set: function(value) { console.log("Setting `o.bar` to", value); }, enumerable:true } }); console.dir(obj) console.log(Object.values(obj)) console.log(obj.toLocaleString()) console.log(Object.prototype.toLocaleString(obj))