老师,请检查代码

来源:2-6 编程练习

sheep121

2020-09-13 16:36:31

<!DOCTYPE html>

<html>

<head>

    <meta charset="UTF-8">

    <title></title>

</head>

<body>

<script>

    const arr = ["a",["b","c",["d"],[undefined,"g",["x"],["y"]]],"h",["l"]];

/*补充代码*/


   const [,[,,,[a=0,,b=0,]],,]=arr;

   console.log(a,b);

</script>

</body>

</html>

 


写回答

1回答

好帮手慕言

2020-09-13

同学你好,效果是正确的,继续加油,祝学习愉快~

0

0 学习 · 15276 问题

查看课程