for.....in函数是起到对对象的打印作用
<!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>
var obj = {
name: "刘家奕",
age: "19",
sex: "男",
};
for (var n in obj) {
console.log(obj[n]);
}
</script>
</body>
</html>
for.....in函数、
看控制台