Instantly share code, notes, and snippets.

Embed
What would you like to do?
// Podemos crearlo vacío...
var inicio = [String]()
// ...repitiendo un mismo elemento un número determinado de veces...
var sheldonLlama = [String](repeating: "Toc", count: 3)
print(sheldonLlama)
print("Penny")
print(sheldonLlama)
print("Penny")
print(sheldonLlama)
print("Penny")
// O asignándole valores directamente.
var personajes = [ "Penny", "Leonard", "Sheldon", "Raj", "Howard" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment