Arrow Functions
When returning an object literal directly from an arrow function with a concise body, what syntax must be used?
When returning an object literal directly from an arrow function with a concise body, you must wrap the object in parentheses: `=> ({key: value})`. This is necessary because without parentheses, JavaScript interprets the curly braces as the function body delimiters rather than an object literal. The parentheses tell the JavaScript engine to treat the curly braces as an expression (an object literal) rather than as a block of statements. For example, `const getUser = id => ({ id, name: 'User' + id });` correctly returns an object, while `const getUser = id => { id, name: 'User' + id };` would be interpreted as a function body with two statements (both of which do nothing) and no return value. This parenthesized syntax is a common source of confusion for developers new to arrow functions but becomes second nature with practice. It's only required when directly returning an object literal with the concise (implicit return) syntax.