Understanding the generic type syntax #
Generic type allows us to create a specific type by allowing us to pass types into it as parameters. The parameters are passed inside angle brackets. If there are multiple parameters, they are separated by a comma.
const myVar = GenericType<SpecificType1, SpecificType2, ...>
This will make more sense as we use some of the standard generic types below.
Get hands-on with 1400+ tech skills courses.