while (looping over something) { if (cond1) { create @foo if cond1 is met do a bunch of things, and go to the next iteration in the loop } else { since cond1 is not met, don't create a new @foo but do something to @foo already declared in the prev iteration do other things, and go to the next iteration in the loop } }