17.
What is the type of the parameter in the following function declaration: function ex(param1?: string){}?
any
string | undefined
undefined
string
Correct: B
The type of the parameter param1 is string | undefined. The question mark ? denotes that the parameter is optional, and it can either be a string or undefined.