/ Published in: ActionScript 3

Give your for-loops a label so you can break them individually
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var a:uint, b:uint = 0; loopA:for(a = 0; a < 10; a++) loopB:while(b++ < 100) loopC:for each(var c:uint in [0,1,2,3]) break loopB; trace(a, b, c); // traces "10 10 0"
Comments
