请检查谢谢
来源:2-13 编程练习
张小阳_
2022-10-20 23:58:36
<!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 fn = function () { // arguments对象 const [x, y] = [...arguments]; console.log(x, y); } fn(1, 3); const [l1, l2, l3] = [...list]; console.log(l1, l2, l3); const [a, b] = [...map]; console.log(a, b); </script> </body> </html>
1回答
同学你好,代码是正确的。继续加油,祝学习愉快!
相似问题