1interface OptionalMiddleName {
2 firstName: string;
3 middleName?: string;
4 lastName: string;
5}
6function Component({firstName, middleName = "N/A", lastName}:OptionalMiddleName){
7 // If middleName wasn't passed in, value will be "N/A"
8}