老师请检查
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<script>
const arr = ["a", ["b", "c", ["d"],
[undefined, "g", ["x"],
["y"]
]
], "h", ["l"]];
/*补充代码*/
const [, [, , , [a = 0, , [b], , ]], , ] = arr;
console.log(a, b);
</script>
</body>
</html>
30
收起
正在回答
1回答
同学你好,代码正确,很棒,祝学习愉快!
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星