Skip to content

Instantly share code, notes, and snippets.

@gollodev
Created July 2, 2017 05:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gollodev/5d0315db8f317598efa39524294c38cd to your computer and use it in GitHub Desktop.
Save gollodev/5d0315db8f317598efa39524294c38cd to your computer and use it in GitHub Desktop.
pos1-condicionales4
switch (expresion) {
case valor1:
// se ejecuta esta sentencia cuando valor1 es true
[break;]
case valor2:
// se ejecuta esta sentencia cuando valor2 es true
[break;]
...
case valorN:
// se ejecuta esta sentencia cuando valorN es true
[break;]
default:
// se ejecuta cuando ningun valor coincide con la expresion.
[break;]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment