Created
November 13, 2014 05:24
-
-
Save yurivictor/66b2e34d23513603ce22 to your computer and use it in GitHub Desktop.
loop invariant
This file contains hidden or 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 letters = ['a', 'b', 'c']; | |
var length = letters.length; | |
var i = 0; | |
/* This is loop invariant. IDK. */ | |
while ( i < length ) { | |
console.log( letters[i] ); | |
i++; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment