r/javascript • • May 28 '19

What are some JavaScript things beginners don't know?

333 Upvotes

383 comments sorted by

View all comments

Show parent comments

2

u/amdc !CURSED! May 29 '19

Out of interest, what are cases where promises are more appropriate (besides .race and .all which you totally can use in conjunction with await)?

1

u/SharkLaunch May 29 '19

If you're modifying a non-async method used in a lot of places, and you find you need to work with a promise inside it, it's much easier to just pass it callbacks than to make the method async and refactor every place where it's called.