I am following an on-line tutorial on JavaScript. Currently the guy is teaching functions, when I copy what he is doing and have exactly the same text on my editor it does not work on chrome or any other browser.
I did some research and people were saying JavaScript is blocked, however I checked in chrome and its not. I went to settings, content settings and I can see that is says " Allow all sites to run JavaScript (recommended)".
I do not get an error, just a blank page. I am completely new to programming and this is putting me off the tutorial.
<!DOCTYPE html>
<html>
<head
<title>Functions</title>
</head>
<body>
<script type="text/javascript">
var foo = doSomething(2);
var bar = doSomething(3);
function doSomething(paramOne){
paramOne = paramOne + 3;
paramOne = paramOne + 1;
paramOne = ParamOne * 8 ;
return paramOne;
}
alert(foo);
alert(bar);
</script>
</body>
</html>