If use small scripts or only scripts in a web few pages then
<html>
<head>
<title>A Sample JavaScript</title>
<script language=javascript>
<!--
the JavaScript code goes here...
// -->
</script>
</head>
<body>
...
</body>
</html>