Skip to content

Instantly share code, notes, and snippets.

@heinthanth
Last active September 1, 2019 03:38
Show Gist options
  • Save heinthanth/509d6708b3c819652c53372d2c2eb5bb to your computer and use it in GitHub Desktop.
Save heinthanth/509d6708b3c819652c53372d2c2eb5bb to your computer and use it in GitHub Desktop.
For Loop
for(var i = 0; i < 5; i++) {
/*
will execute 5 times
since i < 5 is true for 5 times
*/
}
// if initializer is already initialized, no need to initialize;
var j = 0;
for(; j < 6; j++) {
/*
will execute 6 times
since j < 6 is true for 5 times
*/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment