DEV Community


Discussion on: What does Javascript Promise us for 2020?

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

vuesomedev profile image
Gábor Soós Author

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

Forem Open with the Forem app