老师,检查下
来源:2-13 编程练习
Lanny_Chung
2022-04-27 15:12:51
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
</ul>
<script>
// Nodelist对象
const list = document.querySelectorAll('li')
// Map对象
const map = new Map([
['a', 1],
['b', 2]
])
// 在此补充代码
const [c, d, e] = [...list];
console.log(c, d, e);
const [g, h] = [...map];
console.log(g, h);
const fn = function () {
// arguments对象
// 在此补充代码
const [a, b] = [...arguments];
console.log(a, b);
}
fn(1, 3);
</script>
</body>
</html>1回答
同学你好,代码实现是对的,继续加油,祝学习愉快~