I found this information a more appropriate answer to this question by copying the contents below from http://www.html5rocks.com/en/tutorials/speed/script-loading/ , for more details.
<script src = "// other-domain.com/1.js"> </script>
<script src = "2.js" </ script>
Ah, blissful simplicity. Here, the browser will download both scripts in parallel and execute them as soon as possible, preserving their order. "2.js" will not be executed until "1.js" executes (or does not), "1.js" will not be executed until the previous script or stylesheet is executed, and so on. .d. Etc.
Unfortunately, the browser blocks the further display of the page while all this is happening. This is due to the DOM APIs from the "first century of the Internet", which allow you to add lines to content that is parsed by a parser, such as document.write. New browsers will continue to scan or analyze the document in the background and start downloading for external content that may be needed (js, images, css, etc.), but rendering is still blocked.
That's why the great and useful world of performance recommends putting script elements at the end of your document, as it blocks as little content as possible. Unfortunately, this means that your script is not browsed by the browser until it has loaded all of your HTML code, and by this point it has started loading other content such as CSS, images, and frames. Modern browsers are smart enough to prioritize JavaScript over images, but we can do better.
source share