You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
585 B
JavaScript

<html>
<head>
<title>A Demonstration of a Nested Loop - Happy Codings :-) JavaScript Code Examples</title>
</head><body>
<script type="text/javascript">
<!--
document.write("All x,y coordinates between (0,0) and (9,9):<br>")
for (var x = 0; x < 10; ++x) {
for (var y = 0; y < 10; ++y) {
document.write("(" + x + "," + y + "),");
}
document.write('<br>');
}
document.write("<br>After completing the loop, x equals : " + x);
document.write("<br>After completing the loop, y equals : " + y);
// -->
</script>
</body>
</html>