為什么下面代碼的輸出結果的情況會不一樣:var Box = {};box.prototype.name = "xee";box.prototype.study = { return this.name;}var box = new Box();alert(box.prototype); //結果是Undefiledalert(box.constructor); //這個卻是 Object,constructor不也是要通過_proto_指針訪問的嗎?為什么他卻不是Undefiled
關于原型prototype
狐的傳說
2018-08-20 17:10:40