function Person(name,age){
this.name = name;
this.age = age;
}
Person.prototype = {
constructor:Person,
infoLog:function(){
console.log(this.name,this.age)
}
}
const person1 = new Person("张三",20)
const person2 = new Person("李四",18)
person1.infoLog()
person2.infoLog()