mirror of
https://github.com/qianguyihao/Web.git
synced 2024-10-30 04:24:44 +08:00
17 lines
161 B
Markdown
17 lines
161 B
Markdown
|
|
||
|
|
||
|
```
|
||
|
var arr = [1, 2, 3];
|
||
|
|
||
|
fun(arr);
|
||
|
console.log(arr);
|
||
|
|
||
|
function fun(a) {
|
||
|
a = [];
|
||
|
|
||
|
}
|
||
|
```
|
||
|
|
||
|
上方代码的打印结果是:[1,2,3]
|
||
|
|