Discuss / JavaScript / 会怎样呢?

会怎样呢?

Topic source
    function inherits(Child, Parent) {
        var F = function () {};
        F.prototype = Parent.prototype;
        Child.prototype = new F();
        //Child.prototype.constructor = Child;
    }
  请问,如果把最后一行注释掉会怎样呢?

  • 1

Reply