I realize this is a really old topic, but since my standard approach is not here yet, I thought I post it for the future googlers.
var a, b, abort = false; for (var a = 0; a < 10 && !abort; a++) { for (var b = 0; b < 10 && !abort; b++) { if (condition) { doSomeThing(); abort = true; } } }