批改状态:合格
老师批语:很简洁
<script>let name = "张三"; let age = 18; let height = 1.8; const man = `姓名:${name},年龄:${age},身高:${height}`; console.log(man);</script>

<script>let name = "张三";let age = 18;let height = 1.8;test`姓名:${name},年龄:${age},身高:${height}`;function test(str, age, height) {console.log(str); // 字符串类型的数组console.log(age);console.log(height);}</script>

let obj = {name: "小明",age: 18,height: 1.8,};// 对象的解构const { name, age, height } = obj;console.log(name, age, height);

let arr = [1, 2, 3, 4];console.log(...arr);// 数组的解构;const [a, b, c, d] = arr;console.log(a, b, c, d);

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号