Arrow Functions
How would you write an arrow function that takes a single parameter and returns its square?
The correct way to write an arrow function that takes a single parameter and returns its square is `const square = x => x * x;`. This demonstrates two key features of arrow function syntax: 1) When there's only one parameter, the parentheses around the parameter list are optional; and 2) When the function body consists of a single expression, the curly braces and `return` keyword can be omitted (implicit return). This concise syntax is one of the main advantages of arrow functions for simple operations. Option 1 uses an incorrect arrow symbol (`->`). Option 3 includes curly braces but is missing the required `return` statement when using a block body. Option 4 incorrectly includes the `return` keyword in a concise body without curly braces. The correct function could also be written with parentheses or a block body as: `const square = (x) => x * x;` or `const square = x => { return x * x; }`, but the solution shown is the most concise valid form.