<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>JavaScript for loop initialize param optional</title>
</head>
<body>
<pre> <!-- Use pre element for work document.writeln() method -->
<script>
var num = 1;
for(; num <= 10; num++){
document.writeln(num + ": iteration");
}
document.writeln("End of for loop");
</script>
</pre>
</body>
</html>