Check out a free preview of the full Intermediate React Native course:
The "TypeScript Exercise" Lesson is part of the full, Intermediate React Native course featured in this preview video. Here's what you'd learn in this lesson:

Students are instructed to complete the TypeScript Playground by implementing the given pet type.

Get Unlimited Access Now

Transcript from the "TypeScript Exercise" Lesson

>> Now this was a bit of a whirlwind intro into Typescript and we have come to a TypeScript exercise. If you open this TypeScript playground you should see something prefilled. All right, so here we have an array of pets, so we've got a cat and a dog and a fish and we have a type for the pet.

[00:00:19] So here you have an array of pets and then you have the type of the pet, but I haven't implemented the whole type. So know what you know now using string, number, optional types and arrays implement the rest of this type.