学习链接
Promise.prototype.finally

promise.finally(() => {// 语句});// 等同于promise.then(result => {// 语句return result;},error => {// 语句throw error;});
实现
Promise.prototype.myFinally = (callback) => {return this.then(value => Promise.resolve(callback()).then(() => value),reason => Promise.resolve(callback()).then(() => { throw reason; }))};
