This article describes the usage of javascript reference assignment (address value transfer). Share it for your reference. The details are as follows:
JavaScript By default, arrays, objects, and functions are reference assignments, as shown in the following code:
Copy the code as follows: <html>
<head>
<script type="text/javascript">
var a={age:20,height:175};
var b = a;
alert(b.age);
b.age = 25;
alert(a.age);
</script>
</head>
<body>
</body>
</html>
Results are 20 and 25 respectively
I hope this article will be helpful to everyone's JavaScript programming.