请老师检查作业

来源:2-13 编程练习

鱼档卖鱼

2022-05-20 21:18:01

<!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')

        const [li1,li2,li3]=[...list];

        console.log(li1,li2,li3);

        // Map对象

        const map = new Map([

            ['a', 1],

            ['b', 2]

        ])

        // 在此补充代码

        const [a,b]=[...map]

        console.log(a,b);

        const fn = function () {

            // arguments对象

            const [g,s]=[...arguments]

            // 在此补充代码

            console.log(g,s);

        }

        fn(1, 3)

    </script>

</body>


</html>


写回答

1回答

好帮手慕小李

2022-05-21

同学你好,代码实现是对的,继续加油,祝学习愉快~

0

0 学习 · 17877 问题

查看课程