I have a really basic JavaScript project, I'm just testing out and learning the language. All I want the program to do is launch and call a function inside the external main.js file. At the moment nothing happens on launch.
I have tried copying examples given online but they don't seem to be working for me.
HTML File:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Cex_Program</title>
<link href="css/default.css" rel="stylesheet" />
</head>
<body>
<div>Content goes here!</div>
<script src="js/main.js"></script>
<script>
Main();
</script>
</body>
</html>
JavaScript file:
Content of function is irrelevant, I just want the program flow to enter the function (hit my breakpoint);
// Your code here!
var InfiniteLoop = 1;
var DeltaTime = 0;
function Main()
{
var Day = new Date();
var StartTime = Math.round(new Date() / 1000);
var StartCurrentLoopTime = 0;
var EndCurrentLoopTime = 0;
}