Assessment wanted for Sequencing animations - VV

Hey There!

Looking to get an assessment on my Sequencing Animations!

I figured out how to trigger the “.catch(error)” function. I typed “error” in alice1.animate(aliceTumbling, aliceTiming). I write this in a comment in Sequencing Animation 3 below.

Sequencing Animations #1 (Callback Hell):

Sequencing Animations #2 (Promise Chain):

Sequencing Animations #3 (Async, Await):

I really like the methodology of Async/Await. Seemed logical and everything looked neat. In terms of Promise Chaining, I really like using .result(() => ) and .catch(() => {}); just because the flow of it makes sense to me.

Learning & Growing,
Vlad

Congratulations @Vladlen_Vronsky

All three version are correctly implemented.

I completely agree on that one.
I just had a use case where i needed to call two different asynchronous function. Because I didn’t want to wait for the first one to return until I call the second one, I searched for a nice solution on MDN. That’s when I learned about Promise.all(). This lets you trigger multiple async functions simultaneously and wait until all fulfill. It was similar to the example “Using Promise.all() with async functions”.
Really fascinating topic this whole asynchronous stuff. :smiley:

See you,
Michael