title: Why can't I redefine a property in a Javascript object?
body: <p>I am creating a object using <code>Object.create</code> and I want to add properties to it.</p>
  
  <pre><code>&gt; var o = Object.create({});
  undefined
  
  &gt; Object.defineProperty(o, "foo", {value: 43, enumerable: true});
  {foo: 43}
  
  &gt; o
  {foo: 43}
  
  &gt; o.foo
  43
  
  &gt; for (var i in o) { console.log(i); }
  foo
  
  &gt; Object.keys(o)
  ['foo']
  
  &gt; Object.defineProperty(o, "foo", {value: 43, enumerable: false });
  TypeError: Cannot redefine property: bar
  </code></pre>
  
  <p>Q1) Why can't I redefine the property ?</p>
  
  <pre><code>&gt; o.__proto__
  {}
  
  &gt; o.prototype
  undefined
  </code></pre>
  
  <p>Q2) Why is the prototype empty ? And why are these 2 values different i.e. <code>{}</code> vs <code>undefined</code> ?</p>