just start learn web dev ..
i created two files - html file - js file
the js file i wrote code:
function func1()
{
    alert("alert message");
    //document.writeln("document write line");
    //console.log("this is log message");
 }
The html file code:
<html>
<head>
    <script type="text/javascript" src="basicFile.js"/>
</head>
<body>
    <script>
        func1();
    </script>
</body>
Why the alert does not popup ? also the doc.writeln does not work.
When i write the js func1 directly on the html - its work fine
 
    