Welcome
Features (API)
Example HTML
Example CSS
Example JS
We have removed the interval() from our parent loop(). This should cause the block to loop as fast as possible. To make it loop only when the last color box has finished we added await() to the last block in the sub thread. By adding await() the block will not finish until an internal resolve() method is called. If this looks a lot promises then you are correct and returning threads as promises will be covered in a later lesson.
Output
Run
Click "Run" to see the result.
As you can see we still get the nice looping back and forth like from the previous lesson however now the loop is waiting for the transitions to end before iterating.