简单说
简单说,这样做是为了让所有的实例都能通过 constructor 属性访问构造函数
function F() {}
    F.prototype = {
    _name: 'Eric',
    getName: function() {
    return this._name;
    }
};
初看这种方式并无问题,但是你会发现下面的代码失效了:
var f = new F();
alert(f.constructor === F); // output false
F 是实例对象 f 的构造函数,但是f.constructor 并不能指向它的构造函数。
可以手动恢复 构造函数的指向
function F() {}
F.prototype = {
    constructor: F, /* reset constructor */
    _name: 'Eric',
    getName: function() {
    return this._name;
    }
};
这也就是为什么出现以下类似代码的原因
F.prototype.constructor = F