It works fine if I place the code inside the head section:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Web Page title</title>
<script>
function yetAnotherAlert(){
alert("hello World");
}
</script>
</head>
<body>
</body>
</html>
and why it doesn't if I place the code between the body section of the document; nothing happens! Anybody??
example:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Web Page title</title>
</head>
<body>
<script>
function yetAnotherAlert(){
alert("hello World");
}
</script>
</body>
</html>