How can I combine return and switch case statements?
return
switch case
I want something like
return switch(a) { case 1:\"lalala
I normally do it this way:
var result = null; switch(a) { case 1: result = "lalala"; break; case 2: result = "blalbla"; break; case 3: result = "lolollo"; break; default: result = "default"; break; }; return result;