iOS Functions in Swift Adding Power to Functions Function Parameters

Ahmad Ibrahim
Ahmad Ibrahim
10,331 Points

This question makes no sense to me. I don't understand what it means by external names

What do i do from here?

functions.swift
// Enter your code below
func getRemainder(a: Int, b: Int) -> Int {
 return a % b
}

1 Answer

Magnus Hållberg
Magnus Hållberg
16,953 Points

The external name is in this case what comes before a and b in the input of the function. You usually use the external name to explain what kind of input the function wants, the internal name is usually simpler and shorter and is only available inside the function. You separate the internal and external names with a space. Hope this helps.