It is important to avoid blocking a page's rendering when loading the script files in the head section of the HTML document. Scripts should always be loaded at the end of the body section in order to make sure that rendering will not depend on network latency that might occur when fetching the required JavaScript files.
Also, it is important to know that it is best to place inline scripts before CSS stylesheets, as CSS will often prevent the scripts from running until they have finished downloading.
Also, splitting the script file payloads and downloading scripts asynchronously are all techniques that must be thought out when structuring a JavaScript application for performance.
Furthermore, Steve Souders has written ...