Destructuring & Spread Operator
How can you use object destructuring to extract a property that has a space in its name?
To use object destructuring to extract a property that has a space in its name, you write `const { 'property name': propertyName } = obj;`. This syntax uses string literals for the property name and the colon syntax for renaming. Since JavaScript property names with spaces require bracket notation when accessed normally (e.g., `obj['property name']`), destructuring them also requires special handling. The string literal inside the curly braces specifies the exact property name to extract, and the identifier after the colon specifies the variable name to assign it to. This approach works for any property names that aren't valid JavaScript identifiers, including those with spaces, hyphens, or starting with numbers. For example, to destructure properties like 'data-id', '@type', or '42answers', you would use a similar pattern: `const { 'data-id': dataId, '@type': type, '42answers': answers } = obj;`.