SOURCE

function Person(name, age, job){
    this.name = name;
    this.age = age;
    this.job = job;
    this.friends = ['aa', 'bb'];
}
Person.prototype = {
    constructor:Person,
    SayName : function(){
        console.log(this.name);
    }
}

var person1 = new Person("zhangsan", 29, "Software Enginner");
var person2 = new Person("lisi", 31, "Doctor");


person1.friends.push('cc');
console.log(person1.friends);    //aa, bb, cc
console.log(person2.friends);    // aa, bb
console.log(person1.friends === person2.friends);    //false
console.log(person1.sayName === person2.sayName);  //true
console 命令行工具 X clear

                    
>
console