<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>函数参数</title>
</head>
<body>
<script>
function fn5(o,fn){
o.a+=1;
fn(o);
}
function fn6(_o){
_o.a+=10;
}
function fn7(_o){
_o.b=20;
}
var obj4={a:1};
fn5(obj4,fn7);
console.log(obj4);
</script>
</body>
</html>
运行结果
来源:CSDN
作者:你知道歌谣吗?
链接:https://blog.csdn.net/weixin_43392489/article/details/104041038