<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script src="./jquery-1.12.4.js"></script>
<script>
function fn(obj){
let o = {
name:'zhangsan',
age:18,
house:{
tpye:'北京四合院',
value:'1kw'
}
}
$.extend(true,o,obj);
console.log(o);
for(var key in o){
console.log(o[key])
}
}
fn({ car:'bmw',nv:'lili',house:{tpye:'别墅'} });
</script>
</body>
</html>