Created
May 7, 2013 19:00
-
-
Save pgainda/5535169 to your computer and use it in GitHub Desktop.
To increase i by more than just one, use i += number. However, you can't use i + number for this. The increase won't be saved back into i. i will always be the starting value and never satisfy the second loop parameter. This will make the loop run forever and crash your browser
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
var i; | |
for (i = 2; i <= 6; i+=2) { | |
console.log(i); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment