function Person(){ };
Person.prototype.name = "Nicholas";
Person.prototype.age = 29;
console.log(Person.name); //Person console.log(Person.age); //undefined这段代码,为什么Person.name会打印出Person,而不是像Person.age一样打印出undefined?
添加回答
举报
0/150
提交
取消