Is JavaScript multithreaded?

No, JavaScript is not multi-threaded. It is event driven and your assumption of the events firing sequentially (assuming they load sequentially) is what you will see. Your current implementation appears correct. I believe jQuery’s .getScript() injects a new <script> tag, which should also force them to load in the correct order.

Leave a Comment