-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 –