Code without Web Workers.

Demo: Open the console and when you're ready, click the "Begin" button to refresh the page and start the demo. Once the console logs start showing up, try to click the color-change button!

Notice how the color didn't change until the final console log showed up? This is because the while loop is counting down, and while it's counting it's 'blocking' any other actions from being executed until the loop is finished.

This is called 'blocking the stack'. We can use Web Workers to allow us to run that 'Blocking' code on another thread, which will allow color changing button to function properly.

Utilizing Web Workers.