//解构赋值:分为数组和对象的解构赋值,对象的解构赋值是最长用的 let [a, b] = [10, 20] console.log(a) console.log(b) let { name, age } = { name: '对象', age: 22 } console.log(name) function fun() { let ss = 'ss' let vv = 'vv' return { ss, vv } } let { ss, vv } = fun() console.log(ss) console.log(vv)
标签:console,log,ss,解构,let,vv,赋值 From: https://www.cnblogs.com/GFM0518/p/16587931.html