title: Setting prototype for Object Literal
body: <p>Let's say I have the following code;</p>
  
  <pre><code>var A = {a:10};
  var B = {b:20};
  B.prototype = A;
  alert(B.a);
  </code></pre>
  
  <p>I am getting undefined for B.a . 
  Am I doing something wrong? How do I set the prototype for object literal ?</p>
  
  <p>I know how to do for Constructor object. So the following code works perfect</p>
  
  <pre><code>function A(){this.a=10}
  function B(){this.b=20}
  B.prototype = new A();
  b = new B;
  alert(b.a);
  </code></pre>
  
  <p>How do I do it for object literal ?</p>