Question: are parameters optional in javascript?
Answer: Method 1: Undefined arguments However, JavaScript lets you call functions omitting some parameters, filling in the other parameters with the value undefined . ... This method only allows the last arguments to be optional - you cannot make an optional first parameter, middle parameter, or combination of parameters optional.