Default Parameters
What happens when you use the default parameter value in conjunction with object destructuring?
Default values can be applied both to the entire destructuring parameter and to individual destructured properties. This creates a powerful combination for handling complex function parameters. For example: `function processUser({ name = 'Anonymous', role = 'User' } = {}) { ... }`. In this function, if no object is passed at all, the empty object default `= {}` ensures destructuring won't fail. Additionally, if the passed object is missing the `name` or `role` properties, their respective default values ('Anonymous' and 'User') will be used. This two-level defaulting provides great flexibility and robustness. You can destructure arrays with defaults similarly: `function getCoordinates([x = 0, y = 0] = []) { ... }`. This pattern is commonly used in modern JavaScript libraries and frameworks to create functions with numerous optional parameters while maintaining a clean interface and providing sensible defaults.