Switch

Description
Checks a value for specific conditions and executes code when found.

Syntax
Switch(param1) { case "sub_param1" : break; case "sub_param2" : break; case "sub_param3" : break; ... default: }

Example
Switch(Dog) { case "Bulldog" : alert("GROWL"); break; case "Chihuahua" : alert("Bark!"); alert("Bark bark!"); break; case "Basset Hound": case "Beagle": alert("Sniff sniff"); break; default: alert("Drool"); }