Optional Parameter
Easy · Functions
Write fullName(first: string, last?: string): string.
The ? makes last optional, so inside the function its type is string | undefined. Return "first last", or just first when last is missing or empty.
Next: Default Parameter