Is returning out of a switch statement considered a better practice than using break?

The Solution to Is returning out of a switch statement considered a better practice than using break? is


A break will allow you continue processing in the function. Just returning out of the switch is fine if that's all you want to do in the function.

~ Answered on 2011-05-24 17:13:45


Most Viewed Questions: