Default Parameters
Can a default parameter reference earlier parameters in its declaration?
Yes, default parameters can reference earlier parameters in the same function signature. When a default parameter expression is evaluated, all previous parameters in the parameter list are already initialized and can be used in the expression. For example: `function createRect(width, height = width) { return { width, height }; }`. Calling `createRect(10)` creates a square with width and height both equal to 10. This works because `width` is already defined when the default value for `height` is evaluated. However, a default parameter cannot reference parameters that are declared after it in the list (parameters to its right), as those haven't been initialized yet when the default expression is evaluated. This creates a left-to-right evaluation order that you need to be aware of when designing functions with interdependent default parameters.