Example JavaScript "threading" application #1

In this example, we're running two threads that function as daemons (i.e. they never finish/are active during the application lifetime). This is a common practice in languages like Java / C but wouldn't be possible in JavaScript (unless relying on horrid tomfoolery with timeouts and callbacks to continuously change execution stacks).

In this example we observe a spinning GIF image (indicating the CPU has enough resources left to render the UI) and can observe two text messages constantly being updated by each individual thread. These threads never finish as their purpose is to keep updating the text container indefinitely.