Skip to content

Instantly share code, notes, and snippets.


fitomad/swift5_SE-0192.swift Secret

Created Jan 21, 2019
What would you like to do?
public enum Deportes
case futbol
case baloncesto
case tenis
// Vamos a ver cómo funciona esto...
let deportista =
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