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

24 lines
472 B
HTML

<html>
<head>
<title>Example 8.2</title>
<script type="text/javascript">
var numbers = new Array(3);
numbers[0] = 4;
numbers[1] = 5;
numbers[2] = 6;
var result = 0;
result = numbers[0] + numbers[1];
document.write("a): result = " + result + "<br />");
result = numbers[1] * numbers[2];
document.write("b): result = " + result + "<br />");
result = numbers[2] % numbers[0];
document.write("c): result = " + result + "<br />");
</script>
</head>
<body>
</body>
</html>