Iterations can count ...
<html><head><title>Test
Page</title></head> <body>
<script language="JavaScript">
var i, text = ''; // Initialize
text to empty string
for (i=1; i<=5; i=i+1) {
text = text + "Iteration
no.: " + i + "\n";
}
alert(text);
</script></body>
</html>