In my html document (which is in the xampp/htdocs directory), I'm using an external .js file. The .js file is in the same directory as my html file. I'm simply trying to use document.write() function and it's not printing anything.
I don't understand what I'm doing wrong. Whats the issue?
HTML file
<!DOCTYPE html>
<html>
    <head>
        <?php include 'include/head_elements.html'?>
        <script type="text/javascript" src="register.js"></script>
    </head>
    <body>
        <h1>Company Account creation</h1>
        <div id="registration_menu">
            <!--Elements are added and removed dynamically using JS-->
        </div>
        <script>
            hello();
            load_element_group("email_verification");
        </script>
    </body>
</html>
JS file
function hello(){
    document.write("Hello world")
}




register.jsand notRegister.jsorregister.js.js.