Question · Angular course · Module 1: Introduction to Angular
Optional field in an interface
What does the question mark (?) next to a field name in a TypeScript interface mean, e.g. 'techniques?: string[]'?
Answer options
- The field is optional (does not have to be provided)
- The field is read-only
- The field is private
- The field must be a number
Show the answer
Correct answer:
- The field is optional (does not have to be provided)