我们先看一段传统的继承代码: 代码如下: //定义超类 function Father(){ this.name = “父亲”; } Father.prototype.theSuperValue = [“NO1″,”NO2”]; //定义子类 function Child(){ } //实现继承 Child.prototype = new Father(); //修改共享数组 Child.prototype.theSuperValue.push(“修改”); //创建子类实例 var theChild = new Child(); console.log(theChild.theSuperV