Check the loop counter : For « Language Basics « JavaScript DHTML
- JavaScript DHTML
- Language Basics
- For
Check the loop counter
<html>
<head>
<title></title>
</head>
<body>
<script type="text/javascript">
for (var i = 1; i < 101; i++) {
if (i == 99) {
alert("The number is " + i);
}
}
</script>
</body>
</html>
Related examples in the same category