Object Types
Describe the shape of an object by listing its properties and their types.
Exampletypescript
Missing or extra properties are errors, and so are typos.
Exampletypescript
Add ? to make a property optional.
Exampletypescript
Quick check
What does `nickname?: string` mean?
Your turn: write the code
Give user an object type with a name (string) and an age (number), then print Ada is 36.
Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.
Tip: use the left and right arrow keys to move between lessons.