I am building an application in Cordova using Firebase for the database.
I have been using promises to get information back from the database and it works great, but once I get that back I usually have a series of functions that I need to call to update everything.
For example,
update local storage
call variable from local storage
reload page with updated storage information
I need to create/convert my JavaScript functions to be able to be called in succession.
What you are really asking is how to implement a function after a promise is done. If so, then making the function an Async function will do the trick.
For information on async-await check out Async/await.