Fill: Optional Property
Fill in the Blank Easy
Question
Fill in the blank to make email an optional property:
Code
interface User {
name: string;
email ___;
}
Hint
Optional properties use a question mark before the colon.
Explanation
The syntax is ?: string. The full property is email?: string;. The ? marks the property as optional, meaning it may be present or absent. TypeScript treats it as string | undefined.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.