婷婷同学_
JS基本数据类型变量存放基本类型数据实际值;引用数据类型变量保存引用即指针JS基本数据类型:null undefined number booleanstring比较特殊引用数据类型:function object arrayvar a = 11;var b = 1;b = 12;console.log(a); //11 a值随b值改变改变var a = [1,2,3];var b = a;a[0] = 2;console.log(b[0]) //2, b值随着a值改变改指向同内存址var a = [1,2,3];var b = a;b = [11, 12, 13];//b指向另内存址与a断关联a[0] = 2;console.log(b[0]) //11b值随a值改变改变比说 var a = 1; 1基本数据类型变量a存放1值var b = [1,2,3][1,2,3]引用数据类型[1,2,3]放内存变量b存放[1,2,3]址[1,2,3]值使用b变量js解释器通b存放内存址找内存相应址其值取返