28 lines
785 B
HTML
28 lines
785 B
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||
|
|
||
|
<html>
|
||
|
<head>
|
||
|
<title>Example 4.12</title>
|
||
|
<script>
|
||
|
var j = 1; j++;
|
||
|
document.write("<h3> if j = 1, then j++ is " + j++ + "!</p>");
|
||
|
j = 1; j--;
|
||
|
document.write("<h3> if j = 1, then j-- is " + j + "!</p>");
|
||
|
j = 5; j+=2;
|
||
|
document.write("<h3> if j = 5, then j+=2 is " + j + "!</p>");
|
||
|
j = 5; j-=2;
|
||
|
document.write("<h3>if j = 5, then j-=2 is " + j + "!</p>");
|
||
|
j = 4; j*=3;
|
||
|
document.write("<h3> if j = 4, then j*=3 is " + j + "!</p>");
|
||
|
j = 4; j/=2;
|
||
|
document.write("<h3> if j = 4, then j/=2 is " + j + "!</p>");
|
||
|
j = 1; ++j;
|
||
|
document.write("<h3> if j = 1, then ++j is " + j + "</p>");
|
||
|
j = 8; --j;
|
||
|
document.write("<h3> if j = 8, then --j is " + j + "!</p>");
|
||
|
</script>
|
||
|
</head>
|
||
|
<body>
|
||
|
</body>
|
||
|
</html>
|