Good afternoon guys, how are you?
How do I pass an array per parameter? and I would like the array parameter to be optional
Example:
func startGame(teste: Array) -> String {
let randomIndex = Int(arc4random_uniform(UInt32(wordHard.count)))
let word = wordHard[randomIndex]
// verificando se existe palavra atribuida a variavel
if currentWord == "" {
currentWord = word
infoHelp.text = wordHardHelp[randomIndex]
}
return word
}
Thank you friends!