DEV Community

loading...
Cover image for What does Javascript Promise us for 2020?

What does Javascript Promise us for 2020?

Gábor Soós on November 03, 2019

Promises are available since ES2015 to simplify the handling of asynchronous operations. Promises have two well-known combinators: all and race. Bo...
pic
Editor guide
Collapse
maciek134 profile image
Maciej Sopyło

I don't really understand what is the use of try since throwing in a promise was already handled:

new Promise((resolve) => throw new Error('err'));

Would reject like any other promise. I do like the other ones though ;p

Collapse
blacksonic profile image
Gábor Soós Author

At entry scripts where you start synchronous, it can help.

Collapse
rohansawant profile image
Rohan Sawant

What does Javascript Promise us for 2020?

Ha! I see what you did there. ♥

Collapse
blacksonic profile image
Gábor Soós Author

Pun intended :)

Collapse
petecapecod profile image
Peter Cruckshank

Thanks that was a great read! 🤩👍

Collapse
blacksonic profile image