What syntax is used to declare a type parameter in a generic function or type?
iOS interview question for Intermediate practice.
Answer
<T
Explanation
Angle brackets <T are used to declare type parameters in Swift generics. Parentheses are used for tuples, square brackets for arrays/collections, and curly braces for closures or dictionaries.