请老师帮忙检查一下代码,谢谢
来源:2-6 编程练习
廖可爱bongbong
2021-06-21 11:16:48
<!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, [b, c, [d], [e = 1, g, [x], [y]]], h, [l]] = arr;
console.log(a, b, c, d, e, g, x, y, h, l);
</script>
</body>
</html>
1回答
同学你好,代码是对的,继续加油,祝学习愉快~
相似问题