I want to do this:
function save() {
//does some stuff here
somePromise.then(x => {
//do some stuff here
}).then(z => {
//return statement that makes you leave the function
})
}
I have a function and I want to have a return that will finish its execution inside a then because I'm working with promises.
Any help or advice will be greatly appreciated. Thanks in advance.