9. Code: sample21.html
<html>
<head><title> Using Arrays </title></head>
<body>
<script language="JavaScript">
nday = new Array(7);
nday[0] = prompt(“Enter the first day of the
week”,””);
nday[1] = prompt(“Enter the second day of the
week”,””);
nday[2] = prompt(“Enter the third day of the
week”,””);
nday[3] = prompt(“Enter the fourth day of the
week”,””);
10. nday[4] = prompt(“Enter the fith day of the
week”,””);
nday[5] = prompt(“Enter the sixth day of the
week”,””);
nday[6] = prompt(“Enter the seventh day of the
week”,””);
document.writeln(“The first day of the week is “ +
nday[0]);
document.writeln(“<br>”);
document.writeln(“The last day of the week is “ +
nday[6]);
</script>
</body>
</html>