1, the basic data types are: Undefined,boolean,number,string,null. The basic type of access is accessed by value, which means that you can manipulate the actual value of the values that are saved in the variable base type comparison is the comparison of the values . When you compare two different types of variables with = =, some type conversions occur. But when two values are of the same type, even = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = That is, reference types can have properties and methods reference types of storage that require memory for both the stack area and the heap area to be completed together. The stack memory holds the variable identifier and pointer to the object in the heap memory, which is accessed by reference when the object is in the address reference type of the heap memory, in other words, compares the address in the heap memory of two objects in the same way. Reference type transfer problem in JS // 直接赋值的话,因为a和b指向同一个地址。所以用哪一个改变值,都会影响a,b。var b = a;// 只能复制一个和a一样的对象,那a和b就指向不同的地址// 下面是jquery复制对象的方法var b = $.extend(true, {}, a); "Attached" 1, jquery Quick Search Handbook: http://www.php100.com/manual/jquery/
JS Basic type & Reference type