Loading
Current section: 5. Any vs Unknown 3 exercises
lesson

Intro to Any vs Unknown

Loading lesson

Transcript

00:00 Alright. It's time to learn about anything and unknown things. This is the any and unknown exercise. We're gonna learn about these two different types. Any predates unknown.

00:10 And so anytime you see any, it's, very often going to be something that is a little bit older because unknown is better, and we're gonna talk about why today. So just to give you a little intro to these, here we have value is set to any, and now we can literally do anything with it. It's effectively like not having TypeScript at all. Whereas the unknown type says, we don't know what it is. You can't do anything with it.

00:38 So they are basically the opposite. Any says you can do anything with it. Unknown says you can't do anything with it until you, determine what type it is. So that's what you're doing in this exercise. It should be pretty quick.

00:51 Hope you have a good time. We'll see you when you're done.