SOURCE

// Promise.finally

function final(callback){
    const p = this.constructor;
    return this.then(
        value => p.resolve(callback()).then(() => value),
        reson => p.resolve(callback()).then(() => {throw reason})
    )
}
console 命令行工具 X clear

                    
>
console