<html>
<head>
<title>Javascript Global Variables</title>
</head>
<body>
<h4 id="web_site"></h4>
<script type="text/javascript">
var website = "www.freetimelearning.com";
myFunction();
function myFunction() {
document.getElementById("web_site").innerHTML =
"This is our website : " + website;
}
</script>
</body>
</html>
<html>
<head>
<title>Javascript Local Variables</title>
</head>
<body>
<h4 id="local_scope"></h4>
<script type="text/javascript">
myFunction();
document.getElementById("local_scope").innerHTML =
"Our website is " + typeof website;
function myFunction() {
var website = "www.freetimelearning.com";
}
</script>
</body>
</html>