JavaScript ES6 教學
ES6 如何在class上模擬private data/method:
ES6裡的Prototype
let , const 為 block level 變數的關鍵字
if(true){
var x = 1;
}
console.log(x); //1
if(true){
let y = 2; //its lifetime is only in thie scope
}
console.log(y); //exception, undefinedshorthand syntax of Method definitions
其餘部份待補充, 可先參考
Last updated