Last active
August 29, 2015 14:02
-
-
Save macikokoro/9e9c1c5fb220c13ef703 to your computer and use it in GitHub Desktop.
Basic for loop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// for (start; stop; how much to change each time) | |
//if we change counter + 1 for counter + 2 console.log will print our every two numbers) | |
for (var counter = 1; counter <= 5; counter = counter + 1 ) | |
{ | |
// Everything in the code block starting with '{' and | |
// ending with '}' will run once each time through the loop | |
console.log(counter); | |
} | |
console.log("End of loop!"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment