title: Why Object.create polyfill using prototype of Function instead of simple __proto__ of Object?
body: <p>I read the <a href="https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/create" rel="nofollow noreferrer">Object.create() polyfill</a> on the MDN. They create a new Function and set its <code>prototype</code> property to the passing object as following:</p>
  
  <pre><code>if (typeof Object.create != 'function') {
    Object.create = (function() {
      var Temp = function() {};
      return function (prototype) {
        if (arguments.length &gt; 1) {
          throw Error('Second argument not supported');
        }
        if (typeof prototype != 'object') {
          throw TypeError('Argument must be an object');
        }
        Temp.prototype = prototype;
        var result = new Temp();
        Temp.prototype = null;
        return result;
      };
    })();
  }
  </code></pre>
  
  <p>I'm very curious that why it didn't be simply just using <code>__proto__</code> as following:</p>
  
  <pre><code>if (typeof Object.create != 'function') {
    Object.create = (function() {
      var temp = {};
      return function (prototype) {
        if (arguments.length &gt; 1) {
          throw Error('Second argument not supported');
        }
        if (typeof prototype != 'object') {
          throw TypeError('Argument must be an object');
        }
        temp.__proto__ = prototype;
        return temp;
      };
    })();
  }
  </code></pre>
  
  <p>I have tried to run both of these solutions and the result is the same:</p>
  
  <p><a href="https://i.stack.imgur.com/3LFf8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3LFf8.png" alt="enter image description here"></a></p>
  
  <p>In my opinion, the <code>__proto__</code> is shorter and easier to read. Do I miss somethings important behind the scene of the standard solution? </p>