SWITCH Statement?

Hey - still learning Javascript in Unity - I remember from my C programming days there was a SWITCH statement you could use for different decisions (CASE 1, CASE 2 …).

Does such a thing exist in Javascript for Unity and if so, could anyone point me to a link that shows me the syntax?

Thanks - have lot’s of catching up to do - haven’t programmed in 15 years!

switch (var) {
case 1 :
//do something
break;
case 2:
//do somthing else
break;
default:
//don't do anything!
break;
}

cheers.

Ah - brings back fond memories.

Thanks so much.