js constructor 属性详解

 Person.prototype={
                      constructor:Person,//告诉我们当前对象是由那个对象产生的
                      LEGS:2,
                      sayHi:function(){
console.log('Hello, I am ' + this.name+ ', I am '+this.age+' years old, and '+'I have '+this.LEGS+' legs') },
                      showName:function(){
        console.log('I am '+this.name);
                     },
                      showAge:function(){
        console.log('I am '+this.age + ' years old');
                     }

 

不知道你这个问题是否已经解决, 如果还没有解决的话:

如果你已经解决了该问题, 非常希望你能够分享一下解决方案, 以帮助更多的人 ^-^