I was following optional values tutorial, in which we have following method
func findIndexOfString (string : String, array : String[]) -> Int?{
for (index, value) in enumerate(array){
if(value == string){
return index
}
}
return nil
}
however if i call this method by
let indexFound = findIndexOfString("myString", neighbour) //neighbour is array of String
give error that "Missing argument label ''array" in call , means i have to call this by
let indexFound = findIndexOfString("myString", array:neighbour)
Is it made compulsory to mention argument label in call?