V
V
vetsmen2017-08-27 19:06:40
JavaScript
vetsmen, 2017-08-27 19:06:40

Does resolve/reject break the function?

Does resolve/reject break the function?
For example I have code

if(...) {
asyncFunc(...).then(function(data){...}).catch(function(error){...});
resolve(true);
}

Will my asynFunc() run or will it abort when resolve fires?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
myspace, 2017-08-27
@myspace

doesn't break, do return reject/resolve

C
Coder321, 2017-08-27
@Coder321

The function will work

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question