When the HTML page is loaded, it first loads the helper.js file, which defines the showMessage function. Then, it loads the main.js file, which uses the showMessage function to display an alert.
This way, you've included the code from the helper.js file into the main.js file, allowing you to reuse the function across different parts of your project.
Keep in mind that the order of inclusion matters. Scripts are executed in the order they are loaded. If main.js relies on functions or variables from helper.js, ensure that helper.js is included before main.js.