请老师检查
来源:2-13 编程练习
宣与慕
2022-04-11 10:31:11
<!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 [l1, l2, l3] = [...list];
console.log(l1, l2, l3);
const [m1, m2] = [...map];
console.log(m1, m2);
const fn = function () {
// arguments对象
// 在此补充代码
const [a1, a2] = [...arguments];
console.log(a1, a2);
}
fn(1, 3);
</script>
</body>
</html>1回答
樱桃小胖子
2022-04-11