This is the second or third time I've seen it. There is iteration between a and b? What if there will be more than two numbers? Why not Math.min(a, b); ?