Here is code that was in the w3schools tutorial. How would you write it for a .js file? I thought you could just cut and paste this code directly into the .js file. I split them up into my with the function one in js file, and the other in the html body. I know that wrong, but I couldn't find another way to do it. I added the date and locate functions later.. as I had it things worked even though I knew it was bad code, but I was just interested in understand things first. Then clean it up later.. It wasn't until I added the locate function that things got really screwy, and I could not figure out how to correct it or function correctly. I have ran into a lot of little hiccups, but so far, I've figure them out. But, I figure getting the js files coded correctly will help me tremendously.
JavaScript Functions section of the tutorial
<script>document.getElementById("demo").innerHTML ="The temperature is " + toCelsius(32) + " Centigrade";
function toCelsius(fahrenheit) { return (5/9) * (fahrenheit-32);}</script>