2-5 编程练习

来源:2-5 编程练习

慕移动4506339

2022-07-24 18:24:08

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" />
    <title></title>
</head>
<body>
    <script>
        let s=new Set();
        s.add(1).add(2).add(3);
        console.log(s);
        s.delete(2);
        console.log(s);
        console.log(s.size);
        s.forEach(function(value,key,set){
            console.log(value,key,set)
        });
        
    </script>
</body>
</html>

老师,请检查

写回答

1回答

imooc_慕慕

2022-07-24

同学你好,代码效果正确,很棒,祝学习愉快~

0

0 学习 · 15276 问题

查看课程

相似问题