32.
What is an arrow function in JavaScript?
A function that can only be invoked using the call or apply methods.
A type of function that can only be used as a method in an object.
A function that always returns undefined.
A shorthand syntax for writing anonymous functions.
Correct: D
An arrow function is a shorthand syntax for writing anonymous functions in JavaScript. It has a concise syntax and does not bind its own this value, making it useful in certain scenarios like shorter function expressions or when preserving the value of this from its surrounding context.
Example:
hello = () => {
return "Hello World!";
}