ES6
Arrows and Lexical This
const test = [2, 5, 8];
// Expression bodies
const test1 = test.map(v => console.log(v));
const test2 = test.map((v, i, a) => {
console.log(v,i,a);
});
// Statement bodies
test.forEach(v => {
console.log(v);
});
Classes
Symbols
独一无二
let s1 = Symbol();
let s2 = Symbol();
let s3 = Symbol('test');
let s4 = Symbol('test');
if(s1 !== s2 && s3 !== s4){
console.log('y');
}