当前位置:网站首页>4. Basic type and reference type?
4. Basic type and reference type?
2022-07-24 18:21:00 【yingxingyf】
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<input type="button" value=" test " onclick ="testf()" />
</body>
</html>
<script type="text/javascript">
function testf(){
// Value type ; The value is stored in the memory space corresponding to the variable
/*
var m = 20;
var n = m;
n = 50;
document.write("m="+m);//20
*/
// Reference type : The address is stored in the memory space corresponding to the variable ( quote )
var arr1=[12,23,34,45];// Equivalent to var arr1 = new Array(12,23,34,45);
var arr2 = arr1;
arr2[2] = 100;
document.write("arr1[2]="+arr1[2]);
}
</script>

边栏推荐
- Simulation implementation vector
- 【obs】视频、音频编码与rtmp发送的配合
- [OBS] dependency Library: x264 vs Build
- 1688/ Alibaba searches new product data by keyword API instructions
- 运维小白成长记——架构第8周
- PXE efficient batch network installation
- The collapse of margin
- Sword finger offer 21. adjust the array order so that odd numbers precede even numbers
- ORM student management system
- Get familiar with pytoch and pytoch environment configuration
猜你喜欢

下拉列表组件使用 iScroll.js 实现滚动效果遇到的坑

【刷题记录】20. 有效的括号

6126. 设计食物评分系统

如何用WebGPU流畅渲染百万级2D物体?
![[opencv] - thresholding](/img/4e/88c8c8063de7cb10e44e76e77dbb8e.png)
[opencv] - thresholding

How to solve the problem that yaml in idea is unrecognized or red?

Icml2022 Best Paper Award: learning protein reverse folding from millions of predicted structures

6126. Design food scoring system

About the writing method of interface 1 chain interpretation 2. Method execution (finally) must be executed

Maximum sum and promotion of continuous subarrays (2)
随机推荐
缺失值处理
Introduction and use of Pinia
Polymorphism, abstract class, interface
Simulation implementation vector
Example of single table query in ORM student management system
middleware
球面上绘制圆matlab仿真
第五届数字中国建设峰会在福建福州开幕
数组对象方法 常用遍历方法&高阶函数
XSS bypass pose summary
【obs】依赖库: x264 vs 构建
运维小白成长记——架构第8周
1688/ Alibaba searches new product data by keyword API instructions
Pytorch的旅程二:梯度下降
手写博客平台~第二天
0630~ professional quality course
Common methods of string (2)
steam API
Has polardb for PostgreSQL entered the list of Xinchuang database?
Icml2022 Best Paper Award: learning protein reverse folding from millions of predicted structures