모아보는 ES6
1. block scope
{
let a = 10;
{
let a = 20;
console.log(a); // (1)
}
console.log(a); // (2)
}
console.log(a); // (3)let sum = 0;
for (let j = 1; j <= 10; j++) {
sum += j;
}
console.log(sum); // (1)
console.log(j); // (2)if (Math.random() < 0.5) {
let j = 0;
console.log(j); // (1)
} else {
let j = 1;
console.log(j); // (2)
}
console.log(j); // (3)2. block scoped variables
3. arrow function
4. rest parameter
5. spread operator
6. default parameter
7. Enhanced Object Literal
7-1. property Shorthand
7-2. method Shorthand
7-3. Object.assign (ES6)
Object.assign (ES6)8. Destructuring Assignment
9. template literals
10. class
Last updated