Default Parameters
What is the correct syntax for defining a default parameter in JavaScript?
The correct syntax for defining default parameters in JavaScript is `function example(a = 1, b = 2) { }`. This syntax uses the assignment operator (`=`) after the parameter name, followed by the default value. Default parameters are evaluated at call time, so each time the function is called, the default values are newly evaluated. If you call the function without an argument or with the explicit value `undefined` for a particular parameter, the default value will be used. However, other falsy values like `null`, `false`, `0`, or an empty string will be treated as valid inputs and override the default value. This distinction between `undefined` and other falsy values is important and addresses limitations of pre-ES6 workarounds that would incorrectly apply defaults for any falsy value.