Skip to content

Conversation

@p42-ai
Copy link

@p42-ai p42-ai bot commented Jan 12, 2021

Arrow functions are a more concise syntax that can replace the full function syntax in many cases. For example, function(x, y) { return x * y } can be replaced with (x, y) => { return x * y; }.

Arrow functions are slightly different from regular functions, because they do not have bindings to the this, arguments, super or new.target keywords.

Function expressions are only changed to arrow functions when the result is semantically the same and there are no bindings that can affect the execution.

**Arrow functions are a more concise syntax that can replace the full function syntax in many cases.** For example, `function(x, y) { return x * y }` can be replaced with `(x, y) => { return x * y; }`.

Arrow functions are slightly different from regular functions, because they do not have bindings to the `this`, `arguments`, `super` or `new.target` keywords.

Function expressions are only changed to arrow functions when the result is semantically the same and there are no bindings that can affect the execution.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant