This function creates a new
This code calls the previously defined
loadScript() function can be called multiple times with different URLs. Alternatively, an array of URLs can be passed to the function and loaded using a loop. Here is an example:
loadAllScripts() function calls the
loadScript() function for each URL, and increments the
loaded variable and calls itself recursively until all scripts have been loaded.