Control the loop step : For « Language Basics « JavaScript DHTML
- JavaScript DHTML
- Language Basics
- For
Control the loop step
<html>
<head>
<title>A Simple Page</title>
<script language="JavaScript">
for (x = 10; x >= 0; x = x - 2)
{
alert(x);
}
</script>
</head>
<body>
</body>
</html>
Related examples in the same category