Loading problem…
Implement the behavior of Promise.prototype.finally as a standalone helper.
Implement:
Behavior should match native finally semantics:
onFinally after promise settles (both resolve and reject)onFinally throws or returns a rejected promise, reject with that new erroronFinally is not a function, behave like pass-throughDo not use Promise.prototype.finally in your implementation.