原创声明:本文为作者原创,未经允许不得转载,经授权转载需注明作者和出处
//基本类型
var name = "michael";
var name2 = name;
name2 = "jack";
print(name);
//输出结果 michael
//引用类型
function Person(){
}
var person = new Person();
person.name="michael";
var person2 = person;
person2.name="jack";
person2.age=20;
print(person.name);
print(person.age);
//输出结果 jack
var person3 = new Person();
person3.name="lucy";
function print(msg){
document.write(msg);
document.write("<br>");
}