There is two parts to this exercise and I’m having difficulty on getting the first one to work. Any advice or tips would be much appreciated. Here is the code:
<html>
<head>
<title>Project 2-6</title>
</head>
<body>
<font color =”blue”><h1>Project 2-6</h1><hr>
<script type =”text/javascript”>
<!– HIDE FROM INCOMPATIBLE BROWSERS
//STOP HIDING FROM INCOMPATIBLE BROWSERS –>
//array is named songs and list a song from each year starting
//with 1990 and ending with 1999.
var song = new array [10]
songs [0] = “Holy Water”;
songs [1] = “Somebody, Somewhere”;
songs [2] = “Lahaina Aloha”;
songs [3] = “I”ll be Thinking of You”;
songs [4] = “You Give Love A Bad Name”;
songs [5] = “War”;
songs [6] = “Nothing Else Matters”;
songs [7] = “Flush”;
songs [8] = “Bag Full Of Thoughts”;
songs [9] = “The Philosopher’s Stone”;
//trying to display the forementioned array
document.write(“<p>” + songs[0] + “<br />”);
document.write(songs[1] + “<br />”);
document.write(songs[2] + “<br />”);
document.write(songs[3] + “<br />”);
document.write(songs[4] + “<br />”);
document.write(songs[5] + “<br />”);
document.write(songs[6] + “<br />”);
document.write(songs[7] + “<br />”);
document.write(songs[8] + “<br />”);
document.write(songs[9] + “</p>”);
</script>
</body>
</html>