ES6 基础

This commit is contained in:
罗祥
2019-12-15 19:03:36 +08:00
parent f0f3336641
commit 0b506230fe
24 changed files with 1858 additions and 11 deletions

View File

@@ -0,0 +1,22 @@
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