Skip to content

Instantly share code, notes, and snippets.

@steve54b
Created June 2, 2015 21:52
Show Gist options
  • Save steve54b/702f482a99874a5f9097 to your computer and use it in GitHub Desktop.
Save steve54b/702f482a99874a5f9097 to your computer and use it in GitHub Desktop.
The first block will:
1) output "do/while" to the console once
2) output "10" to the console once
3) decrement a from 10 to 9
4) execute whatever may be indicated in the
"while (a < 10 && a > 0)" loop until the "while" condition
is false (there is no indication of how the value of "a" will
be maniputlated, if at all, in the while loop.
The three lines within the second block's "while" loop will
never execute. given "a" = 10 going into the loop, and
the part of the condition requiring a to be less than 10 will fail
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment