Mainly the external script or CSS files are added in the <head>
section or at the end of the <body>
section.
The included script or CSS files take time to load and it may slow down your site if they are more in numbers.
With the use of JavaScript, you can dynamically add external file references to your page on the Client side.