var longLive = function (a, b) { var i = 0, result, rockIsAlive = true; do { if (i++ % 2 == 0) { result += a; } else { result += b; } } while (rockIsAlive); } longLive("Rock"," N' Roll");