-
-
Save fitomad/d135e435b9726cabd448c7bf464adbf7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public enum Deportes | |
{ | |
case futbol | |
case baloncesto | |
case tenis | |
} | |
// Vamos a ver cómo funciona esto... | |
let deportista = Deportes.futbol | |
switch deportista | |
{ | |
case .futbol: | |
print("Jugador de fútbol") | |
case .baloncesto: | |
print("Juegas al baloncesto") | |
@unknown default: | |
print("Practicas otro tipo de deporte") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment