Skip to main content

Quiz: Type Basics

Test what you learned in this lesson before moving on.

Lesson Quiz

Pass with 80% to complete this lesson.

1. What type does TypeScript infer for `let x = 42`?

2. Which type should you use instead of `any` when you want type safety but don't know the type yet?

3. How do you mark a property as optional in an object type?

4. What is the key difference between a tuple and an array in TypeScript?