>[success] # ES9 -- Object Rest & Spread 1. 可以把对象用展开运算符 ~~~ const input = { a: 1, b: 2, c: 3, } const output = { ...input, c: 4 } console.log(output) // {a: 1, b: 2, c: 4} ~~~ 2. 获取解构赋值时候 ~~~ const input = { a: 1, b: 2, c: 3 } let { a, ...rest } = input console.log(a, rest) // 1 {b: 2, c: 3} ~~~ >[success] # es9 -- for await of 1. 异步迭代器(for-await-of):循环等待每个Promise对象变为resolved状态才进入下一步 ~~~ function TimeOut(time) { return new Promise(function(resolve, reject) { setTimeout(function() { resolve(time) }, time) }) } async function test() { let arr = [TimeOut(2000), TimeOut(1000), TimeOut(3000)] for await (let item of arr) { console.log(Date.now(), item) } } test() // 1560092345730 2000 // 1560092345730 1000 // 1560092346336 3000 ~~~ >[success] # ES9 -- Promise.prototype.finally 1. `Promise.prototype.finally()` 方法返回一个Promise,在promise执行结束时,无论结果是fulfilled或者是rejected,在执行then()和catch()后,都会执行finally指定的回调函数