關(guān)于2:00的prototype指向
2:00那里,因?yàn)锽osn.prototype是指向原Student.prototype的內(nèi)存實(shí)體,而Student.prototype賦了一個(gè)新對(duì)象,是創(chuàng)建一個(gè)新內(nèi)存實(shí)體然后Student.prototype指向它,所以這樣一來(lái)Bosn.prototype !== Student.prototype了,這樣理解?
2:00那里,因?yàn)锽osn.prototype是指向原Student.prototype的內(nèi)存實(shí)體,而Student.prototype賦了一個(gè)新對(duì)象,是創(chuàng)建一個(gè)新內(nèi)存實(shí)體然后Student.prototype指向它,所以這樣一來(lái)Bosn.prototype !== Student.prototype了,這樣理解?
2015-07-25
舉報(bào)
2016-01-06
我覺(jué)得不是的,Bosn并不可以作為構(gòu)造函數(shù),所以它是沒(méi)有prototype屬性的