python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Why is this output reached?
Can anyone tell me why this code outputs the following? I am completely lost on async functions and close to just giving up.
The first await does what I expect and waits 1 second before executing. How...
user8897159
Votes: 0
Answers: 0
Redux saga race effect in pure javascript
In redux saga we have race effect where we can pass named promises:
const { a, b } = yield race({ // will resolve if one of them resolves
a: call(somePromise),
b: call(somePromise2),
});
if...
underfrankenwood
Votes: 0
Answers: 0
What is the best practice in this situation Async Await with try/catch or Promise.then().catch()?
I try to create a function that returns values from the server, if one of the values returns with an error then everything that comes back to me from the function falls and I get NULL,
If I use tr...
Rainbox
Votes: 0
Answers: 1
Is it possible to prevent JavaScript promises from handling exceptions/errors
I have a problem with JavaScript promises. Many times I intentionally "reject" them, and use the catch statement to process the rejected logic.
However the catch statement also triggers when...
YAHsaves
Votes: 0
Answers: 0