ES6

==判断,会在比较时进行类型转换
===判断(严格判断),比较时不进行隐式类型转换,类型不同就会返回false

Object.is()===判断的基础上特别处理了NaN-0+0,保证-0+0不再相同,但Object.is(NaN,NaN)会返回true

ES6常用功能

解构赋值

const obj = {a: 10, b: 20, c: 30};
const {a, b} = obj;
console.log(a); //10
console.log(b); //20

const arr = ['a', 'b', 'c'];
const [x, y, z] = arr;
console.log(x); //a
console.log(y); //b
console.log(z); //c