var person = newObject();
person.name = "BigHead"; //添加name属性
alert("My name is " + person.name); //"My name is BigHead"var dog = "one";
dog.age = 2;
alert(dog.age); //undefined
functionf(a){
a = 1;
}
var a = 0;
f(a);
alert(a);//0,a本身并没有改变functionsetName(person){
person.name = "BigHead";
}
var person = newObject();
setName(person);
alert(person.name); //BigHead,person本身改变了哦