Instantly share code, notes, and snippets.

Embed
What would you like to do?
let canciones = [
"Auld Wives - Bear's Den",
"Colors - Beck",
"Behind Closed Doors - Rise Against",
"The Vibe of a Mango - The Free",
"Honey Bucket - Burn The Priest"
]
let listaAleatorio = canciones.shuffled()
print(listaAleatorio)
/*
["Auld Wives - Bear\'s Den", "Honey Bucket - Burn The Priest", "Behind Closed Doors - Rise Against", "Colors - Beck", "The Vibe of a Mango - The Free"]
*/
var mutableCanciones = [
"Auld Wives - Bear's Den",
"Colors - Beck",
"Behind Closed Doors - Rise Against",
"The Vibe of a Mango - The Free",
"Honey Bucket - Burn The Priest"
]
mutableCanciones.shuffle()
print(mutableCanciones)
/*
["Auld Wives - Bear\'s Den", "Colors - Beck", "Behind Closed Doors - Rise Against", "The Vibe of a Mango - The Free", "Honey Bucket - Burn The Priest"]
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment