Intermediate TypeScript
Q66 / 100

What is the purpose of generics default type parameters, e.g. "interface Box<T = string>"?

Correct! Well done.

Incorrect.

The correct answer is B) If no type argument is provided when using Box, T defaults to string

B

Correct Answer

If no type argument is provided when using Box, T defaults to string

Explanation

Default type parameters provide a fallback type used when the generic is referenced without an explicit type argument.

Progress
66/100