DEV Community

Discussion on: What does Javascript Promise us for 2020?

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
 
sonicoder profile image
Gábor Soós

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