Skip to content

Tag: promise

Perform an action after a promise.then callback

I’m trying to encapsulate some intialization / clean up code in a single Promise. What I want if to execute some code, execute the then and then execute some more code. This is what I came up with: which gives me the following output in the terminal: All good so far. However, when we make the callback a…