Option 1 - switch using return:
function myFunction(opt) { switch (opt) { case 1: retur
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.