Object.create instead of Constructors for inheritance
问题 I want to be able to learn creating Objects per the new JavaScript ECMA 5 standards, and use them in my current projects, without breaking functionality. But I see un-explainable stuff that makes me afraid Consider the following code: var foo = { oldProp: 'ECMA Script 3', newProp: 'ECMA Script 5' }; // The new way of inheritance var bar = Object.create( foo ); // and of assigning properties, if I am right var bar2 = Object.create( Object.prototype, { oldProp: { value: 'ECMA Script 3'},