-5
function Js() {};
var js = new Js();
js.constructor.prototype; //Js {}
Js.prototype = {};
js.constructor.prototype; Object {}
function Js() {};
var js = new Js();
js.constructor;//function Js() {}
Js.prototype = {};
js.constructor;//function Js() {}
constructor.prototype
和constructor
之間的區別?在哪裏上市是規範「constructor.prototype」
已經描述過約constructor.prototype
的行爲規範嗎?
'js.constructor === Js',因此'js.constructor.prototype === Js.prototype'。 'Js'是一個函數,'Jsprototype'是一個對象。不確定你的問題是什麼。如果這是你想要的,你可以閱讀[spec](http://www.ecma-international.org/ecma-262/5.1/#sec-15.3.5.2)中的'prototype'。 –
已經描述過在哪裏? – re96
如果您問的是「原型」的描述,請點擊我評論中的鏈接。這裏又是:http://www.ecma-international.org/ecma-262/5.1/#sec-15.3.5.2 –