Type Parameters
The problem generics solve. You want one function that works with arrays of anything. Without generics you have two bad options: return any and lose the type, or write the function once per type.
A type parameter is a placeholder the caller fills in, usually without noticing.
You rarely pass the type explicitly. Inference works it out from the arguments, which is why generics are far more common in code you read than in code you write.
T is a convention rather than a rule. Name it for what it holds when that helps: <Item>, <Row>, <Payload>.
Mark this lesson complete
Signed in, your progress follows you to every device.