ASDV-WebDev/Semester 1/Chapter ZIPs/JavaScript/ch8/ex_8_3.html

19 lines
392 B
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Example 8.3</title>
<script type="text/javascript">
var food = new Array();
food[0] = "pizza";
food[1] = "hamburger";
document.write("Original length: " + food.length + "<br />");
food[2] = "chips";
food[3] = "cake";
document.write("New length: " + food.length);
</script>
</head>
<body>
</body>
</html>