Sending an alert to the screen

You can use JavaScript to send an alert to the screen. Although this isn’t
used much on web pages, you do use it for troubleshooting your programs,
and it’s a quick way to see JavaScript in action too.

Begin by opening your text editor with a new or blank document. In the text
editor, place the following HTML and JavaScript:
<!doctype html>
<html>
<head>
<title>Another Basic Page</title>
</head>
<body>
<h1>Here’s another basic page</h1>
<script type=”text/javascript”>
alert(“hello”);
</script>
</body>
</html>
Save the file as basic.html in your document root.