in reply to Re: "return" to break out of a loop
in thread "return" to break out of a loop
We already have the ternary operator, but I find it can get hard to maintain when used often in one statement. Sparkling some do { .. }'s in only makes it a bit better.sub is_even { if (shift % 2) { 0 } else { 1 } }
|
|---|