请老师检查
来源:2-13 编程练习
慕圣7292417
2021-09-17 22:36:49
<!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 [a, b, c] = [...list];
console.log(a, b, c);
const [d, e] = [...map];
console.log(d, e);
const fn = function () {
// arguments对象
// 在此补充代码
const [a, b] = [...arguments];
console.log(a, b);
}
fn(1, 3)
</script>
</body>
</html>
1回答
好帮手慕然然
2021-09-18
同学你好,代码实现很正确,继续加油,祝学习愉快!