Quiz · Functions · lesson 4 of 10Quiz — ? or a default valueHow does an optional parameter ? differ from a parameter with a default value?[A]A default value widens the parameter to string | undefined exactly as ? does, so both need a check inside the body. The one difference is that the default is also used when the caller passes null, while ? reacts only to a missing argument or undefined.[B]A default value is computed once, when the function is declared, and every call shares it, so a default [] hands all callers one array. ? computes nothing and keeps the parameter string, with no check needed.[C]They are two spellings of one feature: both keep the parameter string inside the body, and tsc adds the undefined check for you. That is why name?: string = "guest" is the usual way to write an optional parameter together with its fallback value in a signature.[D]Both let the caller leave the argument out, but the type inside the body differs. name?: string is string | undefined there and needs a check. name = "guest" stays string, because the default replaces any undefined. One parameter cannot have both.← BackOptional, default and rest parametersNext →Function types