function Person() {}
Person.prototype.population = 0;
Person.prototype.constructor = function(name) {
this.name = name;
console.log("Name: " + this.name);
console.log("Population: " + (++this.population) );
}
var p = new Person("Wex");
以下代码似乎不起作用,尽管从逻辑上讲我觉得它看起来很合理。这怎么不显示名字和人口?