Files
Full-Stack-Notes/code/ES6/src/05_destructuring/03_mixed_destructuring.js
2019-12-15 19:03:36 +08:00

23 lines
301 B
JavaScript

let node = {
type: "Identifier",
name: "foo",
loc: {
start: {
line: 1,
column: 1
},
end: {
line: 1,
column: 4
}
},
range: [0, 3]
};
let {
loc: {start},
range: [startIndex]
} = node;
console.log(start.line); // 1
console.log(start.column); // 1
console.log(startIndex); // 0