Trying to learn how libraries work in HTML.
In my HTML file, I am trying to make use of functions from a JavaScript file that is located in the same folder as the HTML file. I would like the function to tell the HTML to print a simple message to the screen, so I know I've made some progress, but alas, I have no clue what I'm doing. This is as far as I got with online sources and a textbook I have on hand.
Here's what my HTML looks like so far:
<!doctype html>
<!-- project9.html -->
<html>
<head>
<title>Testing Function</title>
<script type="text/javascript" src="test.js"></script>
<script type="text/javascript">
function Test()
</script>
</head>
</body>
</html>
This is the test.js file, located in the same folder as the HTML file:
function Test(){
return ' test '
}
I'm overlooking something super simple, aren't I?