Question: why are optional parameters added?
Answer: Optional parameter takes makes value of parameters to 'undefined', while Default parameters provides default value to parameter if you don't provide it any value. ... Passing 'null' will cause the function to take 'null' as a value of that parameter.