while (value) { var foo = undefined; if (bar) { foo = []; } if (foo) { doIt(); } }