Skip to content

Instantly share code, notes, and snippets.

@jamiebullock
Created September 3, 2020 17:16
Show Gist options
  • Save jamiebullock/23f47b9e42345b03f7a4cc93262f25ab to your computer and use it in GitHub Desktop.
Save jamiebullock/23f47b9e42345b03f7a4cc93262f25ab to your computer and use it in GitHub Desktop.
Switch statement
switch (expression)
{
case value1:
// code executed if expression matches value1
[break;]
case value2:
// code executed if expression matches value2
[break;]
...
case valueN:
// code executed if expression matches valueN
[break;]
[default:
// code executed if expression has no match
[break;]]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment