tototototototot

All posts tagged break

Break statement and labels

The break statement allows us to skip the execution of a loop or statement: [sourcecode language=’cpp’] for(var i:int = 0 ; i < 10 ; i++) { if ( i >= 5 ) { break; } } [/sourcecode] Simple. Now imagine we have a loop nested in another loop: [sourcecode language=’cpp’] for(var i:int = 0 […]