值类型和引用类型的传递:
function Person(name, age, salary){
this.name = name;
this.age = age;
this.salary = salary;
}
function f1(person){
person.name = 'ls';
person = new Person('ww', 18, 3000);
}
var p = new Person('zs', 20, 4000);
console.log(p.name);
f1(p);
console.log(p.name);