摘要: 解构赋值:从数组和对象中取值,对变量进行赋值 let [x, , y] = [1,2,3] x: 1, y: 3 let [x, y, ...z] = ['a'] x: 'a', y: undefined, z:[] 如果右边的不是数组 那么就会报错 对象的解构赋值: let {bar, foo} 阅读全文
posted @ 2020-04-27 16:30 有梦想的咸鱼7 阅读(134) 评论(0) 推荐(0) 编辑