colinox/FED-Notes

ES6结构赋值方法

Opened this issue · 0 comments

ES6结构赋值方法

const props = {
    a: 1,
    b: 2,
    c: 3
}

const {a,c} = props;

console.log(a,c) // 1,3