Return to Snippet

Revision: 8200
at September 8, 2008 15:29 by wizard04


Initial Code
outer_loop:
while(outer_condition)
{
	//some statements
	while(inner_condition)
	{
		//some statements
		if(skip_the_rest_of_inner) continue;
		if(exit_inner_and_skip_the_rest_of_outer) continue outer_loop;
		if(exit_inner_loop) break;
		if(exit_outer_loop) break outer_loop;
		//statements to skip
	}
	//statements to skip
}

statements_block:
{
	//some statements
	if(skip_remaining_statements) break statements_block;
	//statements to skip
}

Initial URL


Initial Description
Just some pseudo-code notes about using labels with `break` and `continue` statements.

Initial Title
JavaScript labels

Initial Tags
javascript

Initial Language
JavaScript