For loops in JavaScript
by danielkwood
HTML
<html>
<head>
<title>For loops</title>
<script src="script.js"></script>
</head>
<body>
</body>
</html>
JavaScript
// In this example, the counter called i starts at 0 and the loop starts when the counter is no longer lass than 10.
// The counter goes up by 1 for every iteration of the loop.
for(i=0; i < 10; i++){
console.log(i);
}
console.log("Goodbye");